Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Sfpiano

Catching leaks in MFC?

This topic is 5278 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have some memory leaks in my mfc program, and I''m trying to find out where they are. I''ve read I''m supposed to include something like: #define _CRTDBG_MAP_ALLOC #include <stdlib.h> #include <crtdbg.h> and then add another statement at the beginning of my program, but I don''t know where the ''beginning'' is for MFC. I tried adding _CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); in numerous places in the main app file, but I didn''t get anything.

Share this post


Link to post
Share on other sites
Advertisement
I get this output:
Dumping objects ->
{48} normal block at 0x00C52638, 33 bytes long.
Data: < C > 00 43 00 CD CD CD CD CD CD CD CD CD CD CD CD CD
{47} normal block at 0x00C525D0, 40 bytes long.
Data: < |L > 14 7C 4C 10 16 00 00 00 00 00 00 00 00 00 00 00
Object dump complete.


So I put _CrtSetBreakAlloc(48); at the beginning of InitInstance() in my main app file, but it didn't do anything.

[edited by - Sfpiano on February 8, 2004 12:22:13 PM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!