提交 4f86b2c5 编写于 作者: M Megvii Engine Team 提交者: chenyuanzhao

fix(mge/subgraph): fix mem leak

GitOrigin-RevId: dc7bfe6265a5ac7e7d9c02d29d7ca3084ddcabf8
上级 cbf9f136
...@@ -450,6 +450,7 @@ void _init_py_op_def(py::module m) { ...@@ -450,6 +450,7 @@ void _init_py_op_def(py::module m) {
py_type.tp_richcompare = PyOp(OpDef)::tp_richcompare; py_type.tp_richcompare = PyOp(OpDef)::tp_richcompare;
py_type.tp_getset = py_op::py_getsetters; py_type.tp_getset = py_op::py_getsetters;
py_type.tp_repr = py_op::py_repr; py_type.tp_repr = py_op::py_repr;
py_type.tp_dealloc = py_dealloc_generic<PyOp(OpDef)>;
mgb_assert(PyType_Ready(&py_type) >= 0); mgb_assert(PyType_Ready(&py_type) >= 0);
m.add_object("OpDef", reinterpret_cast<PyObject*>(&py_type)); m.add_object("OpDef", reinterpret_cast<PyObject*>(&py_type));
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册