include <boost/shared_ptr.hpp>
using namespace std;
class Student
{
private:
string name;
public:
Student(string name) : name(name)
{
cout << "Student" << endl;
}
~Student()
{
cout << "~Student" << endl;
}
};
int main()
{
boost::shared_ptr<Student> student(new Student("furong"));
}
Student
~Student