{"id":638,"date":"2010-07-12T10:36:02","date_gmt":"2010-07-12T08:36:02","guid":{"rendered":"http:\/\/mariusbancila.ro\/blog\/?p=638"},"modified":"2018-02-28T22:20:55","modified_gmt":"2018-02-28T20:20:55","slug":"how-to-find-the-source-of-memory-leaks","status":"publish","type":"post","link":"https:\/\/mariusbancila.ro\/blog\/2010\/07\/12\/how-to-find-the-source-of-memory-leaks\/","title":{"rendered":"How to Find the Source of Memory Leaks"},"content":{"rendered":"<p>When you run your (unmanaged\/C++) application in debugger, you see at the end a report of memory leaks (if any are detected). Something like this:<\/p>\n<blockquote><p>Detected memory leaks!<br \/>\nDumping objects -><br \/>\nf:\\dd\\vctools\\vc7libs\\ship\\atlmfc\\src\\mfc\\strcore.cpp(141) : {381} normal block at 0x001FFC30, 54 bytes long.<br \/>\nData: < x > 0C 00 B9 78 12 00 00 00 12 00 00 00 01 00 00 00<br \/>\nd:\\marius\\vc++\\memoryleakstest\\memoryleakstestdlg.cpp(163) : {380} normal block at 0x001FFBF0, 4 bytes long.<br \/>\nData: <@ > 40 FC 1F 00<br \/>\nf:\\dd\\vctools\\vc7libs\\ship\\atlmfc\\src\\mfc\\thrdcore.cpp(306) : {374} client block at 0x001FFA38, subtype c0, 68 bytes long.<br \/>\na CWinThread object at $001FFA38, 68 bytes long<br \/>\nObject dump complete. <\/p><\/blockquote>\n<p>Some of them can be fixed immediately, because when you double click on them Visual Studio will take you to the line where the allocation was made. Some of them are harder to spot, because Visual Studio is not able to do the same. Question is how do you find the source of those allocations? Luckily, there is this global variable called <strong>_crtBreakAlloc<\/strong>, that can be used to force the debugger to stop the execution when a certain block is allocated.<\/p>\n<p>In order to use that, you should follow several steps:<\/p>\n<ul>\n<li>First, you have to find a reproducible sequence that produces the same memory allocation number. When memory blocks are allocated, they are identified with a number, called allocation number. This number is reported by Visual Studio in brackets when it lists the memory leaks (e.g. {381}).<\/li>\n<li>Second, you have to put a breakpoint somewhere in your program to force a stop at the beginning of the execution. That means you could use function main(), your CWinApp derived class constructor, function InitInstance() or other, depending on your application type and how early in the execution of the program the block that leaks is allocated. The smaller the allocation number is, the earlier in the execution the allocation occurs.<\/li>\n<li>Run your program in debugger.<\/li>\n<li>When the program stops (at the first breakpoint) open the Watch window and add the following expression: <strong>{,,msvcr90d.dll}_crtBreakAlloc<\/strong> in the Name column. In the Value column (which by default should have the value -1) write the allocation number. Take notice that msvcr90d.dll (which is the DLL that contains the C++ runtime library) is specific to Visual Studio 2008 (and is the debug version). If you use another version of Visual Studio, you have to use the appropriate DLL.<\/li>\n<li>Continue debugging.<\/li>\n<li>When the block identified by the allocation number set in the Watch window is allocated, the debugger will stop the execution and jump to a line from dbgheap.c.<br \/>\n<img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"\/blog\/wp-content\/uploads\/2010\/07\/vcdeb_memoryleak1.png\" title=\"Set a breakpoint and add _crtBreakAlloc in Watch window\" class=\"alignnone\" width=\"638\" height=\"247\" \/><br \/>\nIn order to see the line in your code that triggered the allocation, open the Call Stack window and find, from top down, the first function from your own code.<br \/>\n<img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"\/blog\/wp-content\/uploads\/2010\/07\/vcdeb_memoryleak2.png\" title=\"Find the source of the allocation\" class=\"alignnone\" width=\"722\" height=\"537\" \/><br \/>\nThat will lead you to the source of the memory leak.<\/li>\n<\/ul>\n<div class=\"edit-lite\">If you are using Visual Studio 2015 or a newer version you need to use <tt>ucrtbased.dll<\/tt> instead of <tt>msvcrXXd.dll<\/tt>. This new DLL is part of the Universal C Runtime Library where the _crtBreakAlloc is available from.<\/p>\n<p>See:<\/p>\n<ul>\n<li><a href=\"https:\/\/blogs.msdn.microsoft.com\/vcblog\/2015\/03\/03\/introducing-the-universal-crt\/\">Introducing the Universal CRT<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/cpp\/porting\/upgrade-your-code-to-the-universal-crt\">Upgrade your code to the Universal CRT<\/a><\/li>\n<\/ul>\n<\/div>\n<p>To read more about this topic see: <\/p>\n<ul>\n<li>\n<a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/w2fhc9a3%28VS.80%29.aspx\">How to: Set Breakpoints on a Memory Allocation Number<\/a><\/li>\n<li><a href=\"http:\/\/support.microsoft.com\/kb\/151585\">How to use _crtBreakAlloc to debug a memory allocation<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>When you run your (unmanaged\/C++) application in debugger, you see at the end a report of memory leaks (if any are detected). Something like this: Detected memory leaks! Dumping objects -> f:\\dd\\vctools\\vc7libs\\ship\\atlmfc\\src\\mfc\\strcore.cpp(141) : {381} normal block at 0x001FFC30, 54 bytes long. Data: < x > 0C 00 B9 78 12 00 00 00 12 00 &#8230; <a title=\"How to Find the Source of Memory Leaks\" class=\"read-more\" href=\"https:\/\/mariusbancila.ro\/blog\/2010\/07\/12\/how-to-find-the-source-of-memory-leaks\/\" aria-label=\"Read more about How to Find the Source of Memory Leaks\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","advgb_blocks_editor_width":"","advgb_blocks_columns_visual_guide":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[52,10],"tags":[35,55],"class_list":["post-638","post","type-post","status-publish","format-standard","hentry","category-tools","category-visual-studio","tag-debugger","tag-visualstudio"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.1.1 - aioseo.com -->\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Marius Bancila\"\/>\n\t<meta name=\"keywords\" content=\"debugger,visualstudio\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/mariusbancila.ro\/blog\/2010\/07\/12\/how-to-find-the-source-of-memory-leaks\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.1.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Marius Bancila&#039;s Blog | About code. Mostly on C++\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"How to Find the Source of Memory Leaks\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/mariusbancila.ro\/blog\/2010\/07\/12\/how-to-find-the-source-of-memory-leaks\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2010-07-12T08:36:02+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2018-02-28T20:20:55+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"How to Find the Source of Memory Leaks\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2010\\\/07\\\/12\\\/how-to-find-the-source-of-memory-leaks\\\/#article\",\"name\":\"How to Find the Source of Memory Leaks\",\"headline\":\"How to Find the Source of Memory Leaks\",\"author\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/author\\\/admin\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"\\\/blog\\\/wp-content\\\/uploads\\\/2010\\\/07\\\/vcdeb_memoryleak1.png\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2010\\\/07\\\/12\\\/how-to-find-the-source-of-memory-leaks\\\/#articleImage\"},\"datePublished\":\"2010-07-12T10:36:02+02:00\",\"dateModified\":\"2018-02-28T22:20:55+02:00\",\"inLanguage\":\"en-US\",\"commentCount\":12,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2010\\\/07\\\/12\\\/how-to-find-the-source-of-memory-leaks\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2010\\\/07\\\/12\\\/how-to-find-the-source-of-memory-leaks\\\/#webpage\"},\"articleSection\":\"Tools, Visual Studio, debugger, VisualStudio\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2010\\\/07\\\/12\\\/how-to-find-the-source-of-memory-leaks\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/#listItem\",\"name\":\"IT\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/#listItem\",\"position\":2,\"name\":\"IT\",\"item\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/#listItem\",\"name\":\"Software\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/#listItem\",\"position\":3,\"name\":\"Software\",\"item\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/visual-studio\\\/#listItem\",\"name\":\"Visual Studio\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/#listItem\",\"name\":\"IT\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/visual-studio\\\/#listItem\",\"position\":4,\"name\":\"Visual Studio\",\"item\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/visual-studio\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2010\\\/07\\\/12\\\/how-to-find-the-source-of-memory-leaks\\\/#listItem\",\"name\":\"How to Find the Source of Memory Leaks\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/#listItem\",\"name\":\"Software\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2010\\\/07\\\/12\\\/how-to-find-the-source-of-memory-leaks\\\/#listItem\",\"position\":5,\"name\":\"How to Find the Source of Memory Leaks\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/visual-studio\\\/#listItem\",\"name\":\"Visual Studio\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/#organization\",\"name\":\"Marius Bancila's Blog\",\"description\":\"About code. Mostly on C++\",\"url\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/author\\\/admin\\\/#author\",\"url\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/author\\\/admin\\\/\",\"name\":\"Marius Bancila\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2010\\\/07\\\/12\\\/how-to-find-the-source-of-memory-leaks\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a84dd2831d955c38355ddea55df4df260809b88f36408bc14fd4eab8f7f131c9?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Marius Bancila\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2010\\\/07\\\/12\\\/how-to-find-the-source-of-memory-leaks\\\/#webpage\",\"url\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2010\\\/07\\\/12\\\/how-to-find-the-source-of-memory-leaks\\\/\",\"name\":\"How to Find the Source of Memory Leaks\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2010\\\/07\\\/12\\\/how-to-find-the-source-of-memory-leaks\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/author\\\/admin\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/author\\\/admin\\\/#author\"},\"datePublished\":\"2010-07-12T10:36:02+02:00\",\"dateModified\":\"2018-02-28T22:20:55+02:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/\",\"name\":\"Marius Bancila's Blog\",\"description\":\"About code. Mostly on C++\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"How to Find the Source of Memory Leaks","description":"","canonical_url":"https:\/\/mariusbancila.ro\/blog\/2010\/07\/12\/how-to-find-the-source-of-memory-leaks\/","robots":"max-image-preview:large","keywords":"debugger,visualstudio","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/mariusbancila.ro\/blog\/2010\/07\/12\/how-to-find-the-source-of-memory-leaks\/#article","name":"How to Find the Source of Memory Leaks","headline":"How to Find the Source of Memory Leaks","author":{"@id":"https:\/\/mariusbancila.ro\/blog\/author\/admin\/#author"},"publisher":{"@id":"https:\/\/mariusbancila.ro\/blog\/#organization"},"image":{"@type":"ImageObject","url":"\/blog\/wp-content\/uploads\/2010\/07\/vcdeb_memoryleak1.png","@id":"https:\/\/mariusbancila.ro\/blog\/2010\/07\/12\/how-to-find-the-source-of-memory-leaks\/#articleImage"},"datePublished":"2010-07-12T10:36:02+02:00","dateModified":"2018-02-28T22:20:55+02:00","inLanguage":"en-US","commentCount":12,"mainEntityOfPage":{"@id":"https:\/\/mariusbancila.ro\/blog\/2010\/07\/12\/how-to-find-the-source-of-memory-leaks\/#webpage"},"isPartOf":{"@id":"https:\/\/mariusbancila.ro\/blog\/2010\/07\/12\/how-to-find-the-source-of-memory-leaks\/#webpage"},"articleSection":"Tools, Visual Studio, debugger, VisualStudio"},{"@type":"BreadcrumbList","@id":"https:\/\/mariusbancila.ro\/blog\/2010\/07\/12\/how-to-find-the-source-of-memory-leaks\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog#listItem","position":1,"name":"Home","item":"https:\/\/mariusbancila.ro\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/#listItem","name":"IT"}},{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/#listItem","position":2,"name":"IT","item":"https:\/\/mariusbancila.ro\/blog\/category\/it\/","nextItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/#listItem","name":"Software"},"previousItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/#listItem","position":3,"name":"Software","item":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/","nextItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/visual-studio\/#listItem","name":"Visual Studio"},"previousItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/#listItem","name":"IT"}},{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/visual-studio\/#listItem","position":4,"name":"Visual Studio","item":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/visual-studio\/","nextItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/2010\/07\/12\/how-to-find-the-source-of-memory-leaks\/#listItem","name":"How to Find the Source of Memory Leaks"},"previousItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/#listItem","name":"Software"}},{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/2010\/07\/12\/how-to-find-the-source-of-memory-leaks\/#listItem","position":5,"name":"How to Find the Source of Memory Leaks","previousItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/visual-studio\/#listItem","name":"Visual Studio"}}]},{"@type":"Organization","@id":"https:\/\/mariusbancila.ro\/blog\/#organization","name":"Marius Bancila's Blog","description":"About code. Mostly on C++","url":"https:\/\/mariusbancila.ro\/blog\/"},{"@type":"Person","@id":"https:\/\/mariusbancila.ro\/blog\/author\/admin\/#author","url":"https:\/\/mariusbancila.ro\/blog\/author\/admin\/","name":"Marius Bancila","image":{"@type":"ImageObject","@id":"https:\/\/mariusbancila.ro\/blog\/2010\/07\/12\/how-to-find-the-source-of-memory-leaks\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/a84dd2831d955c38355ddea55df4df260809b88f36408bc14fd4eab8f7f131c9?s=96&d=mm&r=g","width":96,"height":96,"caption":"Marius Bancila"}},{"@type":"WebPage","@id":"https:\/\/mariusbancila.ro\/blog\/2010\/07\/12\/how-to-find-the-source-of-memory-leaks\/#webpage","url":"https:\/\/mariusbancila.ro\/blog\/2010\/07\/12\/how-to-find-the-source-of-memory-leaks\/","name":"How to Find the Source of Memory Leaks","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/mariusbancila.ro\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/mariusbancila.ro\/blog\/2010\/07\/12\/how-to-find-the-source-of-memory-leaks\/#breadcrumblist"},"author":{"@id":"https:\/\/mariusbancila.ro\/blog\/author\/admin\/#author"},"creator":{"@id":"https:\/\/mariusbancila.ro\/blog\/author\/admin\/#author"},"datePublished":"2010-07-12T10:36:02+02:00","dateModified":"2018-02-28T22:20:55+02:00"},{"@type":"WebSite","@id":"https:\/\/mariusbancila.ro\/blog\/#website","url":"https:\/\/mariusbancila.ro\/blog\/","name":"Marius Bancila's Blog","description":"About code. Mostly on C++","inLanguage":"en-US","publisher":{"@id":"https:\/\/mariusbancila.ro\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"Marius Bancila's Blog | About code. Mostly on C++","og:type":"article","og:title":"How to Find the Source of Memory Leaks","og:url":"https:\/\/mariusbancila.ro\/blog\/2010\/07\/12\/how-to-find-the-source-of-memory-leaks\/","article:published_time":"2010-07-12T08:36:02+00:00","article:modified_time":"2018-02-28T20:20:55+00:00","twitter:card":"summary","twitter:title":"How to Find the Source of Memory Leaks"},"aioseo_meta_data":{"post_id":"638","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2021-03-18 21:13:46","updated":"2025-12-12 07:33:21","seo_analyzer_scan_date":null,"focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"author_meta":{"display_name":"Marius Bancila","author_link":"https:\/\/mariusbancila.ro\/blog\/author\/admin\/"},"featured_img":null,"jetpack_publicize_connections":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"Marius Bancila","author_link":"https:\/\/mariusbancila.ro\/blog\/author\/admin\/"},"uagb_comment_info":12,"uagb_excerpt":"When you run your (unmanaged\/C++) application in debugger, you see at the end a report of memory leaks (if any are detected). Something like this: Detected memory leaks! Dumping objects -> f:\\dd\\vctools\\vc7libs\\ship\\atlmfc\\src\\mfc\\strcore.cpp(141) : {381} normal block at 0x001FFC30, 54 bytes long. Data: < x > 0C 00 B9 78 12 00 00 00 12 00&hellip;","coauthors":[],"tax_additional":{"categories":{"linked":["<a href=\"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/tools\/\" class=\"advgb-post-tax-term\">Tools<\/a>","<a href=\"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/visual-studio\/\" class=\"advgb-post-tax-term\">Visual Studio<\/a>"],"unlinked":["<span class=\"advgb-post-tax-term\">Tools<\/span>","<span class=\"advgb-post-tax-term\">Visual Studio<\/span>"]},"tags":{"linked":["<a href=\"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/visual-studio\/\" class=\"advgb-post-tax-term\">debugger<\/a>","<a href=\"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/visual-studio\/\" class=\"advgb-post-tax-term\">VisualStudio<\/a>"],"unlinked":["<span class=\"advgb-post-tax-term\">debugger<\/span>","<span class=\"advgb-post-tax-term\">VisualStudio<\/span>"]}},"comment_count":"12","relative_dates":{"created":"Posted 16 years ago","modified":"Updated 9 years ago"},"absolute_dates":{"created":"Posted on July 12, 2010","modified":"Updated on February 28, 2018"},"absolute_dates_time":{"created":"Posted on July 12, 2010 10:36 am","modified":"Updated on February 28, 2018 10:20 pm"},"featured_img_caption":"","series_order":"","jetpack_shortlink":"https:\/\/wp.me\/pYNdv-ai","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/posts\/638","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/comments?post=638"}],"version-history":[{"count":4,"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/posts\/638\/revisions"}],"predecessor-version":[{"id":2729,"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/posts\/638\/revisions\/2729"}],"wp:attachment":[{"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/media?parent=638"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/categories?post=638"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/tags?post=638"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}