boost::shared_ptr是boost库中用来管理指针的模板,使用它需要#include <boost/shared_ptr.hpp>。本文介绍它的一些基本用法。 第一,boost::shared_ptr管理的指针所指向的对象必须在堆中,因为该模板会在对象离开作用域后调用delete方法,如 Read More
posted @ 2019-02-20 16:12 洗盏更酌 Views(3829) Comments(0) Diggs(0) Edit