destructor member function 析构成员函数
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 函数则是在应用程序退出时调用的。
In the constructor function, a new trace file is opened into which the profiling address trace will be written; within the destructor function, the trace file is closed (see Listing 3).
在constructor函数中,会打开一个新的跟踪文件,分析数据的地址跟踪就是写入这个文件的;在destructor函数中,会关闭这个跟踪文件(参见清单3)。
应用推荐