<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>A7M</author_name>
  <author_url>https://blog.hatena.ne.jp/A7M/</author_url>
  <blog_title>C++Builder好きの秘密基地</blog_title>
  <blog_url>https://a7m.hatenablog.jp/</blog_url>
  <categories>
  </categories>
  <description>shared_ptrを使ってみる unique_ptrが変数の寿命が尽きた段階でメモリ領域を開放するのに対し、shared_ptrは参照カウンタを持ち参照カウンタがゼロになるとメモリ領域を開放する。 #include &lt;iostream&gt; #include &lt;memory&gt; // 円を表す図形 class CPrimitiveCircle { public: CPrimitiveCircle() : x(0), y(0), r(0) {} CPrimitiveCircle(int xx, int yy, int rr) : x(xx), y(yy), r(rr) {} int x, y, r;…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fa7m.hatenablog.jp%2Fentry%2F2024%2F12%2F30%2F160142&quot; title=&quot;スマートポインタの使い方 その2：shared_ptr - C++Builder好きの秘密基地&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>2024-12-30 16:01:42</published>
  <title>スマートポインタの使い方 その2：shared_ptr</title>
  <type>rich</type>
  <url>https://a7m.hatenablog.jp/entry/2024/12/30/160142</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
