未验证 提交 2d29d833 编写于 作者: W wanghuancoder 提交者: GitHub

fix pylayer_memleak (#42501)

上级 f315489d
......@@ -32,7 +32,10 @@ class GradNodePyLayer : public GradNodeBase {
ctx_ = ctx;
}
~GradNodePyLayer() override { Py_DECREF(ctx_); };
~GradNodePyLayer() override {
Py_DECREF(ctx_);
Py_XDECREF(outputs_);
};
virtual paddle::small_vector<std::vector<paddle::experimental::Tensor>,
kSlotSmallVectorSize>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册