cv::Mat class member
Hi,
I'm curious as to whether a cv::Mat
class member is usually wrapped in a boost::shared_ptr
is considered best practice?
I have seen this being used in a few places. If yes, then what are the advantages, specifically when considering if cv::Mat
is used in vision/perception applications.
Thanks
cv::Mat is already a refcounted smartpointer, so using pointers to that will inevitably defeat its purpose and lead to memleaks.
also, opencv has
cv::Ptr
and there isstd::shared_ptr
so no need for boost at all.