Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Weird memory leak detected using opencv 2.4.8

I've created a completely empty new visual studio 2010 MFC project just trying to test the latest opencv 2.4.8, I added some header files to the stdafx.h as shown below:

image description

and added corresponding libs to the linker:

image description

then I added a menu non-popup button "Feat" to carry some testing codes of mine, only two lines:

image description

compiling and linking are both successful, but when I close the program, memory leak happens no matter I pressed button "Feat" or not:

image description

It's pretty weird to me, since even when I don't go into the OnFeat(), no cv::Mat are instantiated, there are still memory leaks detected. There will be no memory leaks only when I delete these two lines of codes in OnFeat(), I've also tried if I only instantiate a cv::Mat in OnFeat() not imread any images, there are still memory leaks detected no matter I go into the OnFeat() or not, but much less, as shown below:

image description

Has anybody encountered this kind of problem? Could it be the way I used opencv? am I doing something totally wrong with opencv? P. S. I've also tried 2.4.7, still has the same problem.

Weird memory leak detected using opencv 2.4.8

I've created a completely empty new visual studio 2010 MFC project just trying to test the latest opencv 2.4.8, I added some header files to the stdafx.h as shown below:

image description

and added corresponding libs to the linker:

image description

then I added a menu non-popup button "Feat" to carry some testing codes of mine, only two lines:

image description

compiling and linking are both successful, but when I close the program, memory leak happens no matter I pressed button "Feat" or not:

image description

It's pretty weird to me, since even when I don't go into the OnFeat(), no cv::Mat are instantiated, there are still memory leaks detected. There will be no memory leaks only when I delete these two lines of codes in OnFeat(), I've also tried if I only instantiate a cv::Mat in OnFeat() not imread any images, there are still memory leaks detected no matter I go into the OnFeat() or not, but much less, as shown below:

image description

Has anybody encountered this kind of problem? Could it be the way I used opencv? am I doing something totally wrong with opencv? P. S. I've also tried 2.4.7, still has the same problem.

click to hide/show revision 3
retagged

updated 2014-02-13 01:56:07 -0600

berak gravatar image

Weird memory leak detected using opencv 2.4.8

I've created a completely empty new visual studio 2010 MFC project just trying to test the latest opencv 2.4.8, I added some header files to the stdafx.h as shown below:

image description

and added corresponding libs to the linker:

image description

then I added a menu non-popup button "Feat" to carry some testing codes of mine, only two lines:

image description

compiling and linking are both successful, but when I close the program, memory leak happens no matter I pressed button "Feat" or not:

image description

It's pretty weird to me, since even when I don't go into the OnFeat(), no cv::Mat are instantiated, there are still memory leaks detected. There will be no memory leaks only when I delete these two lines of codes in OnFeat(), I've also tried if I only instantiate a cv::Mat in OnFeat() not imread any images, there are still memory leaks detected no matter I go into the OnFeat() or not, but much less, as shown below:

image description

Has anybody encountered this kind of problem? Could it be the way I used opencv? am I doing something totally wrong with opencv? P. S. I've also tried 2.4.7, still has the same problem.

click to hide/show revision 4
still waiting answer

Weird memory leak detected using opencv 2.4.8

I've created a completely empty new visual studio 2010 MFC project just trying to test the latest opencv 2.4.8, I added some header files to the stdafx.h as shown below:

image description

and added corresponding libs to the linker:

image description

then I added a menu non-popup button "Feat" to carry some testing codes of mine, only two lines:

image description

compiling and linking are both successful, but when I close the program, memory leak happens no matter I pressed button "Feat" or not:

image description

It's pretty weird to me, since even when I don't go into the OnFeat(), no cv::Mat are instantiated, there are still memory leaks detected. There will be no memory leaks only when I delete these two lines of codes in OnFeat(), I've also tried if I only instantiate a cv::Mat in OnFeat() not imread any images, there are still memory leaks detected no matter I go into the OnFeat() or not, but much less, as shown below:

image description

Has anybody encountered this kind of problem? Could it be the way I used opencv? am I doing something totally wrong with opencv? P. S. I've also tried 2.4.7, still has the same problem.