Using OpenCV in MFC cause memory leak

asked 2018-04-11 06:38:18 -0500

flaviu2 gravatar image

I am using OpenCV into MFC project ... but I noticed something strange: if I only insert

#include <opencv2/opencv.hpp>

then I have a lot of memory leak:

Detected memory leaks!
Dumping objects ->
{27112} normal block at 0x02BA8360, 128 bytes long.
 Data: <                > FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 
{146} normal block at 0x00D35158, 4 bytes long.
 Data: < Q  > 98 51 D3 00 
{145} normal block at 0x00D35098, 125 bytes long.
 Data: <                > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD 
{144} normal block at 0x00D34FE0, 122 bytes long.
 Data: <                > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD 
{143} normal block at 0x00D34F28, 121 bytes long.
 Data: <                > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD 
{142} normal block at 0x00D34E68, 129 bytes long.
 Data: <                > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD 
 Data: <    8L      (   > CD CD CD CD 38 4C D3 00 00 00 00 00 28 00 00 00 
Object dump complete.
The program '[4428] TestOpen.exe: Native' has exited with code 0 (0x0).

and I used no object from OpenCV library ... I have done something wrong ?

edit retag flag offensive close merge delete

Comments

opencv indeed allocates some static buffers for mutexes, random pools, etc, which never are freed (tha's the os'es job) , even if you don't call any code on your own.

nothing to worry about, i'd think.

berak gravatar imageberak ( 2018-04-11 09:12:13 -0500 )edit

Ok, thank you. It is not first time signaled this issue, I wonder how it doesn't been solved by now ...

flaviu2 gravatar imageflaviu2 ( 2018-04-13 03:20:53 -0500 )edit