Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8081627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T16:47:37+00:00 2026-06-05T16:47:37+00:00

I enabled heap debugging to try and debug some memory leak errors. I do

  • 0

I enabled heap debugging to try and debug some memory leak errors. I do so by including the following:

#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>

together with the call to _CrtDumpMemoryLeaks() in a function of interest.

Then I also edit the Project Property configuration to set Debugging type to 'Native Only' and add preprocessor definition '_DEBUG' and C/C++ code generation run time library /MDd. I find that no matter where I put the _CrtDumpMemoryLeaks() function call, it dumps memory leak output as follows.

Detected memory leaks!
Dumping objects ->
{2606} normal block at 0x000000003D3A5370, 32 bytes long.
 Data: <VAR1> 54 48 45 52 4D 41 4C 5F 43 4F 4E 44 55 43 54 49 
{2605} normal block at 0x000000003D3A52E0, 32 bytes long.
 Data: <VAR2> 52 4F 43 4B 5F 48 45 41 54 5F 43 41 50 41 43 49 
{2604} normal block at 0x000000003D3A5250, 32 bytes long.
 Data: <VAR3> 45 51 55 49 4C 49 42 52 41 54 49 4F 4E 5F 52 45 
{2603} normal block at 0x000000003D3A51C0, 32 bytes long.
 Data: <VAR4> 4D 41 58 5F 57 41 54 45 52 5F 43 41 50 49 4C 4C 
{2602} normal block at 0x000000003D3A5130, 32 bytes long.
 Data: <VAR5> 4D 41 58 5F 47 41 53 5F 43 41 50 49 4C 4C 41 52 
{2601} normal block at 0x000000003D3A50A0, 32 bytes long.
 Data: <VAR6> 57 41 54 45 52 5F 43 4F 4D 50 52 45 53 53 49 42 
{2600} normal block at 0x000000003D3A5000, 48 bytes long.

What might this mean? Does it mean that if there was a dump output at the point of the call, then the error/leak actually occurs before that? Can we conclude that for sure? If not, it doesn’t seem to be a really useful utility. Any advise/help on how to use it correctly or with regards to interpretation is appreciated. Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T16:47:39+00:00Added an answer on June 5, 2026 at 4:47 pm

    Assume that you have following pairs:

    int *x = new int[5];
    int *y = new int[7];
    
    delete[] y;
    _CrtDumpMemoryLeaks();
    delete[] x;
    

    Regardless you delete x later dump will include x as non freed. Actually standard MS technique required high skills of memory management understanding. To simplify your life my recomendation is Visual Leak Detector – easy to embed to your project and easily locate errors (and it is free).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I enabled heap debugging because of a memory leak error I started seeing in
I'm having a blast tracking down some heap corruption. I've enabled standard page heap
Can someone please provide some insight into the the following verbosegc lines on a
enabled nszombies Is there any additional information anyone can see in this debug log
While debugging my NServiceBus enabled application, I have certain messages that are reported in
I enabled config_dynamic_debug=y in the Linux kernel customized by myself, and following the dynamic_debug
Suppose a1 , b1 , c1 , and d1 point to heap memory, and
I'm trying to find a memory leak in a windows MFC 8.0 application (Release
I enabled gzip compression on my website, and tested with the following tools: http://www.whatsmyip.org/http_compression/
I have enabled enabled mod_rewrite and have the following in httpd.conf: <Directory /> Options

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.