Solved

Memory leaks...  on a CDialog

Posted on 2001-06-14
8
884 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
  • 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
 
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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 30

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 30

Expert Comment

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

have a nice day,

regards,

ZOPPO
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
xyBalance chalenge 58 88
canBalance challenge 34 65
sumHeights  challenge 17 61
Annoying "thing" blocks my view 4 50
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

706 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now