boost::shared_ptr ã¯åçåé¤å (dynamic deleter) ã¨å¼ã°ããææ³ã«åºã¥ãã¦å®è£ ããã¦ãã¾ãï¼ãã®åçåé¤åã¨ããææ³ã§éè¦ãªã®ã¯ï¼ boost::shared_ptr ãæçµçã«å¼ã³åºã解æ¾å¦çã boost::shared_ptr ã®ãã³ãã¬ã¼ãå¼æ°ã®åã«é¢ä¿ãªãï¼ã³ã³ã¹ãã©ã¯ã¿ã«å®éã«æ¸¡ããããã¤ã³ã¿ã®åã§ï¼ã㤠boost::shared_ptr ã®ã³ã³ã¹ãã©ã¯ã¿ã®å¼ã³åºãã®æ®µé㧠決å®ããï¼ã¨ãããã¨ã§ãï¼ ä»¥ä¸ã®ãããªã³ã¼ããï¼åçåé¤åã®å¹æãä¸çªåãããããä¾ã«ãªãã§ãããï¼ class X{ public: ~X() { std::cout << "X::~X" << std::endl; } }; class B{ public: ~B() // virtual ã§ãªããã¨ã«æ³¨æï¼ï¼ { std::cout << "B::~B" <<
{{#tags}}- {{label}}
{{/tags}}