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:
and added corresponding libs to the linker:
then I added a menu non-popup button "Feat" to carry some testing codes of mine, only two lines:
compiling and linking are both successful, but when I close the program, memory leak happens no matter I pressed button "Feat" or not:
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:
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.
By the way, I've tried both pre-compiled libs and libs compiled by myself, memory leaks detected in both cases.
Problem hasn't been solved yet, can anybody offer some helps on this?
Please if you want to bump, don't create a new answer, just go ahead and edit your question and add an update there. It gets bumped automatically then!
@StevenPuttemans Sorry about that, edit and add an update, got it, thank you very much.