C++ smart pointer for non-object type?
- by Brian
Hi,
I'm trying to use smart pointers such as auto_ptr, shared_ptr. However, I don't know how to use it in this situation.
CvMemStorage *storage = cvCreateMemStorage();
... use the pointer ...
cvReleaseMemStorage(&storage);
I'm not sure, but I think that the storage variable is just malloc'ed memory, not object. Is there a way to use the smart pointers for the storage variable?
Thank you.