...概念扩充了这种思想,并把内存区看作对象(object),这些对象由一组数据结构和几个叫做构造(constructor)或析构(destructor)的函数(或方法)组成。前者初始化内存区,而后者回收内存区。
基于10个网页-相关网页
管理构造函数和析构函数中的异常
因此,也可以在析构函数中安全地使用断言。
Thus, the assertions can be used safely in destructors, too.
队列类的构造函数和析构函数负责创建和销毁互斥锁,见清单1。
The constructor and destructor of the queue class are responsible for the creation and destruction of the mutex, as shown in Listing 1.
应用推荐