Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Memory leaks...  on a CDialog

Posted on 2001-06-14
Medium Priority
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... :)
Question by:David MacDonald
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
LVL 42

Expert Comment

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
LVL 42

Expert Comment

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

Expert Comment

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

CDialogDerived *dd = new CDialogDerived();
delete dd;

hopet this helps
Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf


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...

LVL 31

Accepted Solution

Zoppo earned 400 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'


Expert Comment

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} )

Author Comment

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

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

Expert Comment

ID: 6201364
you're welcome...

have a nice day,



Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

730 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