Open Lewis-luo opened 4 years ago
Are you about this function? https://github.com/AlexeyAB/darknet/blob/b56e8d11cfa4278ad5258eedb5207ae583d16e96/include/yolo_v2_class.hpp#L117-L129
Why do you think that there is a memory leak?
cv::Mat has a destructor that deallocate the memory.
Hi: Dear friend, I find a question about memory leak in "yolo_v2_class.hpp" head file. In "std::shared_ptr mat_to_image_resize(cv::Mat mat) const" function ,if the parameter "mat.size()" is not equal to "network_size" ,there will be obvious memory leak。In other world,if program executes code “cv::resize(mat, det_mat, network_size);”, a memory leak will occur。I think it might be deep copy。
thanks!