using openCV with MFC (windows)

asked 2017-04-16 03:43:41 -0600

mikero gravatar image

updated 2017-04-16 04:59:46 -0600

Hello, I recently linked openCV to my MFC project which ran before without any memory leaks, when I added something as simple as

void function { Mat image; }

visual studio detects a lot of memory leaks, which seems false positives . this problem was fixed by delay loading the opencv_world320d.dll in the linker, but if I try to do something with the images like reading into it or using canny's edge detector the memory leaks reappear.

I also tried to statically load MFC library with no success.

(I also ran the same function on a new project without the MFC, and it works without leaks)

any suggestions on how to fix it? would really appreciate your help!

Thanks

edit retag flag offensive close merge delete

Comments

I have the "OpenCV with MFC" template,but in chinese. link text .It is strong,may it help you.

jsxyhelu gravatar imagejsxyhelu ( 2017-04-16 08:45:47 -0600 )edit

i dont need a guide on how to use openCV, the integration with mfc causing leaks, i need ideas on how to fix it :(

mikero gravatar imagemikero ( 2017-04-16 11:56:08 -0600 )edit