Rules of memory management of openCV


After several weeks’ hard working, finally, the memory leaking problem is fixed. 

In the last post which listed nearly all kinds of variaties declare and delete methods, here i add several tips for memory check while it is leaking:

1) int, double, float … : these kinds of variaties don’t matter so much;

2) IplImage* : this really matters, especially when cvCloneImage is conducted, if the destination variaty was not cleared, the memory would fly up.

3) CvMemStorage: be careful, to delete this data you have to use not ‘cvReleaseData’ but ‘cvReleaseMemStorage’, one declaration, one delete operation.

Author: Andol Li

A HCI researcher, a digital media lecturer, an information product designer, and a python/php/java coder.

Leave a comment
Due to technical adjustments, the comment function is shortly closed and will be re-openning soon. Thanks.

Copyrights 2006-2018 © All rights reserved
Theme Tree2, re-designed by Andol Li, powered by WordPress and Bootsrap
WWW.ANDOL.ME | 浙ICP备15040508号-1
公安备案图标 浙公网安备33010602004018号
Back to top