Entries from 2019-10-08 to 1 day
Shared Pointerの特徴です。 heap内の同じオブジェクトを参照できる assignやmoveをすることができる arrayの管理はdefaultではできない use countが0になった時点でobjectは破棄される 宣言 { std::shared_ptr<int> p1 {new int{100}}; std::cout << *p1 << std:</int>…
Shared Pointerの特徴です。 heap内の同じオブジェクトを参照できる assignやmoveをすることができる arrayの管理はdefaultではできない use countが0になった時点でobjectは破棄される 宣言 { std::shared_ptr<int> p1 {new int{100}}; std::cout << *p1 << std:</int>…