How to Dispose a PCA instance.
I was curious, the PCA class does not implement a dispose/release method, but appears to have the eigenVectors and eigenValues associated with it.
Is there a feature of OpenCV's memory management that handles this?
Regards,
Daniel
i don't think, you'll have to worry about it. if the PCA goes out of scope, eigenVectors/values and mean will clean up on their own ( like any cv::Mat does. )
Well, i wanted to be sure. I also thought the cv::Mat needed the release() function to be called?
Ok, found it....
"The first thing you need to know about Mat is that you no longer need to manually allocate its memory and release it as soon as you do not need it. While doing this is still a possibility, most of the OpenCV functions will allocate its output data automatically. As a nice bonus if you pass on an already existing Mat object, which has already allocated the required space for the matrix, this will be reused. In other words we use at all times only as much memory as we need to perform the task."