I'm trying to use visual leak detecor to detect memory leak caused by OpenCV programs.
A simple testing program is:
#include "stdafx.h" #include <vld.h> int main(int argc, char** argv) { IplImage *img=cvLoadImage("E:/lena.jpg"); char *pBuf = new char[200]; return 0; }
It's obviously that there are two memory leaks, while the result shows:
if I comment the 7th line, then the result is:
So, it seems that Visual Leak Detector doesn't work with OpenCV(at least OpenCV1.0)
http://www.codeproject.com/Articles/9815/Visual-Leak-Detector-Enhanced-Memory-Leak-Detectio may give us some information.
I guess the reason is that VLD haven't traced the memory of OpenCV functions.