
n.破壞者;垃圾焚毀爐
Here is an example of a destructor implementation. 下面是析構(gòu)器實(shí)現(xiàn)的例子。
Method, retain the destructor while carrying out the first item. 方法,則在執(zhí)行第一項(xiàng)時保留析構(gòu)函數(shù)。
But what if a contained object's destructor were allowed to throw? 不過如果允許被包含的對象的析構(gòu)函數(shù)拋出異常會怎樣?
To call a destructor, you must reference an instance object. 要調(diào)用析構(gòu)器,必需引用實(shí)例對象。
A destructor is not limited only to relinquishing resources. 析構(gòu)函數(shù)并不僅限于用來釋放資源。