<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>melpon</author_name>
  <author_url>https://blog.hatena.ne.jp/melpon/</author_url>
  <blog_title>melpon日記 - HaskellもC++もまともに扱えないへたれのページ</blog_title>
  <blog_url>https://melpon.hatenadiary.org/</blog_url>
  <categories>
    <anon>program</anon>
    <anon>C++</anon>
  </categories>
  <description>VisitorパターンをC++で組もうとして、 void AcceptorEx::accept( smart_ptr&lt; Visitor &gt; v ){ v-&gt;visit( smart_ptr&lt; Acceptor &gt;( this ) ); } ええ、失敗しました（;´Д｀） スマートポインタにthisを渡した時点で参照カウントは１。 んでコピーしてvisitの中に入っている時点では２。 visitを抜けると１。 で、acceptを抜けると０になり、thisが解放されます（;´Д｀） でも、自分自身のスマートポインタってどうやって渡すんだろう。 こんな感じかな？ class Hoge{ public…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmelpon.hatenadiary.org%2Fentry%2F20050801%2Fp1&quot; title=&quot;スマートポインタ - melpon日記 - HaskellもC++もまともに扱えないへたれのページ&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>2005-08-01 00:00:00</published>
  <title>スマートポインタ</title>
  <type>rich</type>
  <url>https://melpon.hatenadiary.org/entry/20050801/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
