robotology / stereo-vision

Repository containing apps for stereo vision
https://robotology.github.io/stereo-vision/
GNU General Public License v2.0
19 stars 19 forks source link

IplImage* has memory leak, how to release memory ? #12

Closed Tariq-Abuhashim closed 8 years ago

Tariq-Abuhashim commented 8 years ago

IplImage* cvImageL allocates the memory, and cvReleaseImage( &cvImageL ) is supposed to release it. Looks like it only deletes the pointer, but not the physical memory allocated. This seems to be caused by cvLoadImage: IplImage* cvImageL = cvLoadImage( left_img_file_name.c_str() );

==8172== LEAK SUMMARY: ==8172== definitely lost: 0 bytes in 0 blocks ==8172== indirectly lost: 0 bytes in 0 blocks ==8172== possibly lost: 0 bytes in 0 blocks ==8172== still reachable: 88 bytes in 3 blocks ==8172== suppressed: 0 bytes in 0 blocks ==8172== Rerun with --leak-check=full to see details of leaked memory

Any ideas on how to empty the allocated memory ?

pattacini commented 8 years ago

It seems unrelated to stereo-vision, although stereo-vision still makes use of old OpenCV code. Moving to Q&A...

pattacini commented 8 years ago

Issue moved to robotology/QA #122 via ZenHub