Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 910
  • Last Modified:

Memory leaks... on a CDialog

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
David MacDonald
Asked:
David MacDonald
  • 2
  • 2
  • 2
  • +2
1 Solution
 
Meir RivkinFull stack Software EngineerCommented:
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
 
Meir RivkinFull stack Software EngineerCommented:
r u using dll's?
0
 
makerpCommented:
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
David MacDonaldAuthor Commented:
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
 
ZoppoCommented:
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
 
ShaunWildeCommented:
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
 
David MacDonaldAuthor Commented:
Thanks Zoppo, exactly that...

i'll remember that... you can be sure
0
 
ZoppoCommented:
you're welcome...

have a nice day,

regards,

ZOPPO
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now