destructor member function 析构成员函数
Allows defining a destructor function that runs when an object is destroyed.
允许定义一个析构函数当对像崩溃的时候运行。
To create your constructor and destructor, declare two functions, then apply the constructor and destructor function attributes to them.
要创建constructor和destructor函数,则需要声明两个函数,然后对这两个函数应用constructor和destructor函数属性。
The constructor function is invoked immediately prior to main being called; and the destructor function is called when your application exits.
constructor 函数是在调用 main 函数之前调用的,而 destructor 函数则是在应用程序退出时调用的。
应用推荐