2011/01/19

OpenCV 2.2 라이브러리의 메모리 누수 문제

Visual C++ 2010 에서 OpenCV 2.2 버전을 테스트하고 있는데 라이브러리를 사용을 하기만 하면 메모리 누수가 발생한다.

단순히 이미지만 불러들여 보여주는 것만 하는 코드가 포함된 것 밖에 없는데 이 루틴이 실행이 되는 것도 아닌데도 불구하고 프로그램 종료시 엄청난 메모리 누수가 나오고 있다. 직접 컴파일 한 것 뿐만 아니라 OpenCV 사이트에서 받은 OpenCV-2.2.0-win32-vs2010.exe 를 설치하여 얻은 라이브러리 역시 메모리 누수가 발생한다.


원인을 찾아 봐야겠다. 



Detected memory leaks!
Dumping objects ->
{231} normal block at 0x00737608, 47 bytes long.
Data: <JPEG-2000 Code S> 4A 50 45 47 2D 32 30 30 30 20 43 6F 64 65 20 53
{230} normal block at 0x007375C8, 4 bytes long.
Data: <jpc > 6A 70 63 00
{229} normal block at 0x00737588, 4 bytes long.
Data: <jpc > 6A 70 63 00
{228} normal block at 0x00737518, 51 bytes long.
Data: <JPEG-2000 JP2 Fi> 4A 50 45 47 2D 32 30 30 30 20 4A 50 32 20 46 69
{227} normal block at 0x007374D8, 4 bytes long.
Data: <jp2 > 6A 70 32 00
{226} normal block at 0x00736CB0, 4 bytes long.
Data: <jp2 > 6A 70 32 00
{225} normal block at 0x00737450, 72 bytes long.
Data: <pSs Ts Ws Xs > 70 53 73 00 F0 54 73 00 90 57 73 00 D0 58 73 00
{224} normal block at 0x007373F8, 24 bytes long.
Data: < ss > CD CD CD CD F8 73 73 00 01 00 00 00 CD CD CD CD
{223} normal block at 0x00737398, 32 bytes long.
Data: <JPEG-2000 files > 4A 50 45 47 2D 32 30 30 30 20 66 69 6C 65 73 20
{222} normal block at 0x00737350, 8 bytes long.
Data: < rs > EC 72 73 00 00 00 00 00
{221} normal block at 0x00736AB8, 8 bytes long.
Data: < rs > CC 72 73 00 00 00 00 00
{220} normal block at 0x007372C8, 76 bytes long.
Data: < R js ss > F0 84 E1 52 B8 6A 73 00 98 73 73 00 CD CD CD CD
{219} normal block at 0x00737240, 72 bytes long.
Data: <@Ms Rs Us Vs > 40 4D 73 00 E0 52 73 00 88 55 73 00 F0 56 73 00
{218} normal block at 0x007371E8, 24 bytes long.
Data: < qs > CD CD CD CD E8 71 73 00 01 00 00 00 CD CD CD CD
{209} normal block at 0x007371A0, 8 bytes long.
Data: < ps > B8 70 73 00 00 00 00 00
{208} normal block at 0x00737158, 8 bytes long.
Data: < ps > 98 70 73 00 00 00 00 00
{207} normal block at 0x00737088, 148 bytes long.
Data: < R > 94 84 E1 52 00 00 00 00 00 00 00 00 FF FF FF FF
{206} normal block at 0x00737030, 24 bytes long.
Data: < 0ps > CD CD CD CD CD CD CD CD CD CD CD CD 30 70 73 00
{205} normal block at 0x00736FC0, 48 bytes long.
Data: <Portable Network> 50 6F 72 74 61 62 6C 65 20 4E 65 74 77 6F 72 6B
{204} normal block at 0x00736F78, 8 bytes long.
Data: < ns > CC 6E 73 00 00 00 00 00
{203} normal block at 0x00736F30, 8 bytes long.
Data: < ns > AC 6E 73 00 00 00 00 00
{202} normal block at 0x00736EA8, 76 bytes long.
Data: < R0os os > AC 86 E1 52 30 6F 73 00 C0 6F 73 00 CD CD CD CD
{201} normal block at 0x00736E50, 24 bytes long.
Data: < Pns > CD CD CD CD CD CD CD CD CD CD CD CD 50 6E 73 00
{200} normal block at 0x00736E08, 8 bytes long.
Data: <Pms > 50 6D 73 00 00 00 00 00
{199} normal block at 0x007368E8, 8 bytes long.
Data: <0ms > 30 6D 73 00 00 00 00 00
{198} normal block at 0x00736D20, 168 bytes long.
Data: <T R > 54 86 E1 52 00 00 00 00 00 00 00 00 FF FF FF FF
{196} normal block at 0x00736C58, 24 bytes long.
Data: < Xls > CD CD CD CD 58 6C 73 00 01 00 00 00 CD CD CD CD
{195} normal block at 0x00736BF8, 32 bytes long.
Data: <TIFF Files (*.ti> 54 49 46 46 20 46 69 6C 65 73 20 28 2A 2E 74 69
{194} normal block at 0x00736BB0, 8 bytes long.
Data: <Lks > 4C 6B 73 00 00 00 00 00
{193} normal block at 0x007366E0, 8 bytes long.
Data: <,ks > 2C 6B 73 00 00 00 00 00
{192} normal block at 0x00736B28, 76 bytes long.
Data: <$ R fs ks > 24 8C E1 52 E0 66 73 00 F8 6B 73 00 CD CD CD CD
{190} normal block at 0x00736A60, 24 bytes long.
Data: < `js > CD CD CD CD CD CD CD CD CD CD CD CD 60 6A 73 00
{189} normal block at 0x00736A18, 8 bytes long.
Data: <xis > 78 69 73 00 00 00 00 00
{188} normal block at 0x007360E8, 8 bytes long.
Data: <Xis > 58 69 73 00 00 00 00 00
{187} normal block at 0x00736948, 144 bytes long.
Data: < R > F8 8B E1 52 00 00 00 00 00 00 00 00 FF FF FF FF
{185} normal block at 0x00736890, 24 bytes long.
Data: < hs > CD CD CD CD CD CD CD CD CD CD CD CD 90 68 73 00
{184} normal block at 0x00736810, 64 bytes long.
Data: <Portable image f> 50 6F 72 74 61 62 6C 65 20 69 6D 61 67 65 20 66
{183} normal block at 0x007367C8, 8 bytes long.
Data: <dgs > 64 67 73 00 00 00 00 00
{182} normal block at 0x00735F08, 8 bytes long.
Data: <Dgs > 44 67 73 00 00 00 00 00
{181} normal block at 0x00736740, 76 bytes long.
Data: <0 R _s hs > 30 88 E1 52 08 5F 73 00 10 68 73 00 CD CD CD CD
{179} normal block at 0x00736688, 24 bytes long.
Data: < fs > CD CD CD CD 88 66 73 00 01 00 00 00 CD CD CD CD
{178} normal block at 0x00736640, 8 bytes long.
Data: <pas > 70 61 73 00 00 00 00 00
{177} normal block at 0x00735918, 8 bytes long.
Data: <Pas > 50 61 73 00 00 00 00 00
{176} normal block at 0x00736140, 1216 bytes long.
Data: < R > 04 88 E1 52 00 00 00 00 00 00 00 00 FF FF FF FF
{174} normal block at 0x00736090, 24 bytes long.
Data: < `s > CD CD CD CD CD CD CD CD CD CD CD CD 90 60 73 00
{173} normal block at 0x00736030, 32 bytes long.
Data: <Sun raster files> 53 75 6E 20 72 61 73 74 65 72 20 66 69 6C 65 73
{172} normal block at 0x00735FE8, 8 bytes long.
Data: < _s > 84 5F 73 00 00 00 00 00
{171} normal block at 0x00735740, 8 bytes long.
Data: <d_s > 64 5F 73 00 00 00 00 00
{170} normal block at 0x00735F60, 76 bytes long.
Data: < R@Ws 0`s > 90 8B E1 52 40 57 73 00 30 60 73 00 CD CD CD CD
{168} normal block at 0x00735EB0, 24 bytes long.
Data: < ^s > CD CD CD CD CD CD CD CD CD CD CD CD B0 5E 73 00
{167} normal block at 0x00735E68, 8 bytes long.
Data: < Ys > 98 59 73 00 00 00 00 00
{166} normal block at 0x00735540, 8 bytes long.
Data: <xYs > 78 59 73 00 00 00 00 00
{165} normal block at 0x00735968, 1220 bytes long.
Data: <d R > 64 8B E1 52 00 00 00 00 00 00 00 00 FF FF FF FF
{163} normal block at 0x007358C0, 24 bytes long.
Data: < Xs > CD CD CD CD CD CD CD CD CD CD CD CD C0 58 73 00
{162} normal block at 0x00735860, 32 bytes long.
Data: <JPEG files (*.jp> 4A 50 45 47 20 66 69 6C 65 73 20 28 2A 2E 6A 70
{161} normal block at 0x00735818, 8 bytes long.
Data: < Ws > B4 57 73 00 00 00 00 00
{160} normal block at 0x00735328, 8 bytes long.
Data: < Ws > 94 57 73 00 00 00 00 00
{159} normal block at 0x00735790, 76 bytes long.
Data: < R(Ss `Xs > E0 82 E1 52 28 53 73 00 60 58 73 00 CD CD CD CD
{157} normal block at 0x007356E8, 24 bytes long.
Data: < Vs > CD CD CD CD E8 56 73 00 01 00 00 00 CD CD CD CD
{156} normal block at 0x007356A0, 8 bytes long.
Data: < Us > B8 55 73 00 00 00 00 00
{155} normal block at 0x00735658, 8 bytes long.
Data: < Us > 98 55 73 00 00 00 00 00
{154} normal block at 0x00735588, 148 bytes long.
Data: < R > B4 82 E1 52 00 00 00 00 00 00 00 00 FF FF FF FF
{152} normal block at 0x007354E8, 24 bytes long.
Data: < Ts > CD CD CD CD E8 54 73 00 01 00 00 00 CD CD CD CD
{151} normal block at 0x00735488, 32 bytes long.
Data: <Windows bitmap (> 57 69 6E 64 6F 77 73 20 62 69 74 6D 61 70 20 28
{150} normal block at 0x00735440, 8 bytes long.
Data: < Ss > 94 53 73 00 00 00 00 00
{149} normal block at 0x007353F8, 8 bytes long.
Data: <tSs > 74 53 73 00 00 00 00 00
{148} normal block at 0x00735370, 76 bytes long.
Data: <X R Ss Ts > 58 82 E1 52 F8 53 73 00 88 54 73 00 CD CD CD CD
{146} normal block at 0x007352D0, 24 bytes long.
Data: < Rs > CD CD CD CD CD CD CD CD CD CD CD CD D0 52 73 00
{145} normal block at 0x00735288, 8 bytes long.
Data: <pMs > 70 4D 73 00 00 00 00 00
{144} normal block at 0x00735240, 8 bytes long.
Data: <PMs > 50 4D 73 00 00 00 00 00
{143} normal block at 0x00734D40, 1216 bytes long.
Data: <, R > 2C 82 E1 52 00 00 00 00 00 00 00 00 FF FF FF FF
{142} normal block at 0x00734CF8, 8 bytes long.
Data: < R > 14 99 E6 52 00 00 00 00
{141} normal block at 0x00734CB0, 8 bytes long.
Data: < R > 00 99 E6 52 00 00 00 00
{139} normal block at 0x00734B90, 29 bytes long.
Data: < Ks Ks > 00 00 00 00 A0 4B 73 00 A7 4B 73 00 00 00 00 00
{138} normal block at 0x00734B18, 57 bytes long.
Data: < ( Js > 00 00 00 00 28 00 00 00 00 00 00 00 A0 4A 73 00
{137} normal block at 0x00734AA0, 54 bytes long.
Data: < ( Ks (Js > 00 00 00 00 28 00 00 00 18 4B 73 00 28 4A 73 00
{136} normal block at 0x00734A28, 53 bytes long.
Data: < ( Js Is > 00 00 00 00 28 00 00 00 A0 4A 73 00 A8 49 73 00
{135} normal block at 0x007349A8, 61 bytes long.
Data: < ( (Js 0Is > 00 00 00 00 28 00 00 00 28 4A 73 00 30 49 73 00
{134} normal block at 0x00734930, 53 bytes long.
Data: < ( Is Hs > 00 00 00 00 28 00 00 00 A8 49 73 00 B0 48 73 00
{133} normal block at 0x007348B0, 61 bytes long.
Data: < ( 0Is 8Hs > 00 00 00 00 28 00 00 00 30 49 73 00 38 48 73 00
{132} normal block at 0x00734838, 56 bytes long.
Data: < ( Hs > 00 00 00 00 28 00 00 00 B0 48 73 00 00 00 00 00
Object dump complete.
<

Original Post : http://neodreamer-dev.tistory.com/487

No comments :

Post a Comment