Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > General Discussion
  New Posts New Posts RSS Feed - How to find memory leak?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to find memory leak?

 Post Reply Post Reply
Author
Message
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Topic: How to find memory leak?
    Posted: 24 October 2009 at 2:08pm
After executing my program I see the following:
 
MyLib.DLL Terminating!
Detected memory leaks!
Dumping objects ->
{29735} normal block at 0x04BDFBF0, 16 bytes long.
 
I know I have DEBUG_NEW defined in all my source code. This memory leak could lie in a 3rd party library or similar.
 
My question is; how can I use the above information to find the allocation that is never freed? The number between the brackets, 29735, is always the same!
PokerMemento - http://www.pokermemento.com/
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 24 October 2009 at 2:16pm
Wohah! Solved it :D
 

_CrtSetBreakAlloc(29735); FTW!

PokerMemento - http://www.pokermemento.com/
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.109 seconds.