<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>halo_w2</author_name>
  <author_url>https://blog.hatena.ne.jp/halo_w2/</author_url>
  <blog_title>きのこる先生 -チラシの裏</blog_title>
  <blog_url>https://halo-w2.hatenadiary.org/</blog_url>
  <categories>
    <anon>Programming</anon>
    <anon>C/C++</anon>
    <anon>Boost</anon>
  </categories>
  <description>頻繁にインスタンスが生成・解体されるような所にはshared_ptrでなくintrusive_ptrを使うことにしてみる。 intrusive_ptrを使うクラスには参照カウンタと、参照カウンタをage/sage用の関数を定義してやる必要がある。 こんなクラスを定義して、こっから派生させるようにすると楽。 class reference_counter { public: reference_counter() : ref_count_(0) { } virtual ~reference_counter() = 0; void add_ref() { ++ref_count_; } void …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhalo-w2.hatenadiary.org%2Fentry%2F20050407%2Fp2&quot; title=&quot; intrusive_ptr - きのこる先生 -チラシの裏&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-04-07 00:00:01</published>
  <title> intrusive_ptr</title>
  <type>rich</type>
  <url>https://halo-w2.hatenadiary.org/entry/20050407/p2</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
