[Other] Fix some memory leak problem (#1422)

* Fix memory leak problem for paddleseg model

* Fix bug

* Update postprocessor.cc

---------

Co-authored-by: root <root@bjyz-sys-gpu-kongming3.bjyz.baidu.com>
This commit is contained in:
Jason
2023-02-23 16:03:40 +08:00
committed by GitHub
parent a1f9aa1c5a
commit 0c664fd006
4 changed files with 6 additions and 43 deletions

View File

@@ -21,8 +21,8 @@ void BindPPMatting(pybind11::module& m) {
.def("predict",
[](vision::matting::PPMatting& self, pybind11::array& data) {
auto mat = PyArrayToCvMat(data);
vision::MattingResult* res = new vision::MattingResult();
self.Predict(&mat, res);
vision::MattingResult res;
self.Predict(&mat, &res);
return res;
});
}