Detected memory leaks! (Bug #3061)


Added by Yung Tseng Chang almost 12 years ago. Updated almost 12 years ago.


Status:Cancelled Start date:2013-05-31
Priority:Normal Due date:
Assignee:Yung Tseng Chang % Done:

0%

Category:highgui-images
Target version:Next Hackathon
Affected version:2.4.5 (latest release) Operating System:
Difficulty: HW Platform:
Pull request:

Description

I use VS2008 &opencv2.4.4 & 2.4.5. When I use imread to load image file ,it's ok. But I close the application then,vs output shows:
Detected memory leaks!
Dumping objects -> {9046} normal block at 0x0C850470, 24 bytes long.
Data: < p > CD CD CD CD CD CD CD CD CD CD CD CD 70 04 85 0C {9045} normal block at 0x080268F0, 8 bytes long.
Data: < > 01 00 00 00 00 CD CD CD {9044} normal block at 0x0C8503F0, 68 bytes long.
Data: < a > 20 B1 E5 07 20 61 02 08 20 B1 E5 07 00 00 00 00 {9043} normal block at 0x08026528, 120 bytes long.
Data: < (e B B * > CD CD CD CD 28 65 02 08 42 00 42 00 98 18 2A 00 {9031} normal block at 0x0C850300, 36 bytes long.
Data: <T B B W o r k > 54 00 42 00 42 00 20 00 57 00 6F 00 72 00 6B 00 {9030} normal block at 0x0C8502A8, 28 bytes long.
Data: < P > 00 00 00 00 00 03 85 0C 50 10 00 00 00 00 00 00 {9029} normal block at 0x08026FA0, 36 bytes long.
Data: <T B B W o r k > 54 00 42 00 42 00 20 00 57 00 6F 00 72 00 6B 00 {9028} normal block at 0x08026F48, 28 bytes long.
Data: < o d > 00 00 00 00 A0 6F 02 08 64 15 00 00 00 00 00 00 {9024} normal block at 0x08026EE8, 36 bytes long.
.........
The picture is in detail.!!!!
My code is very simple:
@CFileDialog dlg (
TRUE,
_T(".bmp"),
NULL,
OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST | OFN_HIDEREADONLY|OFN_EXPLORER,
_T("BMP|.bmp|JPG|.jpg|All Files (.*) |.*||"),
NULL
);
dlg.m_ofn.lpstrTitle = _T("Open Image File");
dlg.m_ofn.lpstrInitialDir="D:\20130319" ;’
CString str1,str2;
if( dlg.DoModal() == IDOK ) {
str2=dlg.GetPathName();
src=cv::imread(str2.GetBuffer(),CV_LOAD_IMAGE_ANYCOLOR);
..................
}@
It just opens file ,show and close the applications.
My computer OS: XP sp3
VS 2008 9.0.30729.1 SP NetFramework 3.5 sp1
Does anyone have any solution?


bug.png (38.6 kB) Yung Tseng Chang, 2013-05-31 03:10 am


Associated revisions

Revision 8368d54d
Added by Vadim Pisarevsky over 10 years ago

Merge pull request #3061 from ElenaGvozdeva:ocl_resize

History

Updated by Alexander Smorkalov almost 12 years ago

  • Category set to highgui-images
  • Target version set to Next Hackathon

Updated by Daniil Osokin almost 12 years ago

  • Priority changed from High to Normal

Updated by Daniil Osokin almost 12 years ago

Hi, Yung!
It looks like there are actually no bugs here. Please, call imread in a cycle and see in task manager is really memory leaks from this app. Q&A forum has similar topic on this: http://answers.opencv.org/question/3685/why-does-this-code-snip-produce-memory-leaks/.

  • Assignee set to Yung Tseng Chang

Updated by Daniil Osokin almost 12 years ago

Please, reopen the ticket, after you will provide response.

  • Status changed from Open to Cancelled

Also available in: Atom PDF