Solved

Memory leaks...  on a CDialog

Posted on 2001-06-14
8
899 Views
Last Modified: 2013-11-20
Hi all,
      just want to know if any of you are familiar with this memory leak :

I just open my Dialog and close it...

Detected memory leaks!
Dumping objects ->
{41} client block at 0x004925D0, subtype 0, 64 bytes long.
a CDynLinkLibrary object at $004925D0, 64 bytes long
a CDynLinkLibrary object at $004925D0, 64 bytes long
Object dump complete.

Wow, how fun... :)
0
Comment
Question by:David MacDonald
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +2
8 Comments
 
LVL 42

Expert Comment

by:sedgwick
ID: 6191046
can u add some coed from your CDialog??

did u try to dbl-click on the mem-leak line sometimes u get to the line where the memory is leaking
0
 
LVL 42

Expert Comment

by:sedgwick
ID: 6191051
r u using dll's?
0
 
LVL 10

Expert Comment

by:makerp
ID: 6192075
is your CDialog of the heap, if so delete it when you are finished with it

CDialogDerived *dd = new CDialogDerived();
dd->DoModal();
delete dd;

hopet this helps
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:David MacDonald
ID: 6192175
Yes, i'm using 2 dll's ... but double-clik not working

The Dlg is on the frame...  

the dll's are loaded direct at the start... maybe they are the cause.... hmmmm...

Ok ... i'll try to look for a leak in the dll's... i'll keep you posted...


0
 
LVL 31

Accepted Solution

by:
Zoppo earned 100 total points
ID: 6194225
Hi Moonover,

maybe it's not a bug at all ... tak a look at this MSDN article:
'PRB: Memory Leaks Reported When Using Multiple MFC DLLs ID: Q167929'
http://support.microsoft.com/support/kb/articles/Q167/9/29.ASP

ZOPPO
0
 
LVL 9

Expert Comment

by:ShaunWilde
ID: 6194595
I agree with zoppo not all leaks reported are actually leaks

to test this put a breakpoint on the constructor of CDynLink and write down the address

then put a break point in  the destructor and see if it is called with the correct address of the original object - if the destructor is being called but it is still reporting as a leak then it is a 'feature' of the leak reporting.

This is made easier obviously if you only have 1 CDynLinkLibrary being created (1 per DLL) adn if it stays at the same allocation number (eg in your case {41} )
0
 
LVL 1

Author Comment

by:David MacDonald
ID: 6196476
Thanks Zoppo, exactly that...

i'll remember that... you can be sure
0
 
LVL 31

Expert Comment

by:Zoppo
ID: 6201364
you're welcome...

have a nice day,

regards,

ZOPPO
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
In this post we will learn different types of Android Layout and some basics of an Android App.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question