mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-25 17:40:35 +08:00
[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:
@@ -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;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user