<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>nekko1119</author_name>
  <author_url>https://blog.hatena.ne.jp/nekko1119/</author_url>
  <blog_title>C++と色々</blog_title>
  <blog_url>https://nekko1119.hatenablog.com/</blog_url>
  <categories>
    <anon>C++</anon>
  </categories>
  <description>気になったので考察してみました。 結論 std::shared_ptr 以外で参照を持つのは寿命管理が難しい 動機 オブジェクトが参照型である言語の場合、普通にクラスに別オブジェクトを持った場合それは参照になります。例えばJavaだと class A { private int value; public A(int value) { this.value = value; } public int get() { return value; } public void set(int value) { this.value = value; } } class B { private A a…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnekko1119.hatenablog.com%2Fentry%2F2018%2F10%2F13%2F051057&quot; title=&quot;C++でクラスに外の参照を持つ方法 - 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>2018-10-13 05:10:57</published>
  <title>C++でクラスに外の参照を持つ方法</title>
  <type>rich</type>
  <url>https://nekko1119.hatenablog.com/entry/2018/10/13/051057</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
