using openCV with MFC (windows)

asked Apr 16 '17

mikero gravatar image

updated Apr 16 '17

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

Preview: (hide)

Comments

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

jsxyhelu gravatar imagejsxyhelu (Apr 16 '17)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 (Apr 16 '17)edit