Print Page | Close Window

How to find memory leak?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: General Discussion
Forum Description: Topics Related to Visual C++ MFC Development in General
URL: http://forum.codejock.com/forum_posts.asp?TID=15446
Printed Date: 21 May 2024 at 12:04pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to find memory leak?
Posted By: znakeeye
Subject: How to find memory leak?
Date 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/



Replies:
Posted By: znakeeye
Date Posted: 24 October 2009 at 2:16pm
Wohah! Solved it :D
 

_CrtSetBreakAlloc(29735); FTW!



-------------
PokerMemento - http://www.pokermemento.com/



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net