<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>wata_d</author_name>
  <author_url>https://blog.hatena.ne.jp/wata_d/</author_url>
  <blog_title>閑古鳥</blog_title>
  <blog_url>https://www.little-cuckoo.jp/</blog_url>
  <categories>
    <anon>C++</anon>
  </categories>
  <description>new や malloc を自分で定義すればメモリ領域を確保する度にそれを記録することができます。前のエントリで VC++ でメモリリークの検出を行えるようにしてみましたが、それをとても簡略化したものを試しに自分で実装してみました。かなりいい加減ですが(テストも全くしていません)、とりあえず動いたっぽいので載せてみます。 #include &lt;iostream&gt; #include &lt;cstdlib&gt; using namespace std; struct memory_list { char* file; int line; memory_list* next; memory_list() : …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.little-cuckoo.jp%2Fentry%2F20080305%2F1204671550&quot; title=&quot;new をオーバーロードしてメモリリークを自力で検出 - 閑古鳥&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>2008-03-05 07:59:10</published>
  <title>new をオーバーロードしてメモリリークを自力で検出</title>
  <type>rich</type>
  <url>https://www.little-cuckoo.jp/entry/20080305/1204671550</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
