<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>pebble8888</author_name>
  <author_url>https://blog.hatena.ne.jp/pebble8888/</author_url>
  <blog_title>Pebble Coding</blog_title>
  <blog_url>https://pebble8888.hatenablog.com/</blog_url>
  <categories>
    <anon>C++11</anon>
  </categories>
  <description>VisualStudio(C++)でメモリリークを検知する方法です。コンソールアプリの場合はmain関数の先頭に以下を追加してデバッグ実行するだけです。 _CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );_CRTDBG_LEAK_CHECK_DF を指定することにより、アプリが終了した時点で解放されていないヒープがデバッグ出力画面に表示されます。このフラグを使用すると、staticに宣言した変数も解放後にチェックが走るため便利です。 表示される{18}のような番号は、メモリ割り当て番号で、何番目にアローケートされたか…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpebble8888.hatenablog.com%2Fentry%2F2019%2F07%2F17%2F224342&quot; title=&quot;VisualStudio(C++)でメモリリークを検知する - Pebble Coding&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-07-17 22:43:42</published>
  <title>VisualStudio(C++)でメモリリークを検知する</title>
  <type>rich</type>
  <url>https://pebble8888.hatenablog.com/entry/2019/07/17/224342</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
