destructors
美
英 
- n.〈英〉垃圾焚化爐;破壞器;爆破裝置
- 網絡析構函數;析構器;解構式
詞形變化
復數:destructors
英漢解釋
英英解釋
例句
Unlike destructors , it is often the case that something done inside a constructor might throw an exception.
與析構函數不同,構造函數內部所做的事情經常會拋出異常。
Destructors are methods that are called by the runtime execution engine when the object is about to be removed from memory .
析構函數是當對象即將從內存中移除時由運行庫執行引擎調用的方法。
The bottom line is that gratuitously declaring all destructors virtual is just as wrong as never declaring them virtual.
基本的一條是無故的聲明虛銷毀函數同從來不聲明為虛銷毀函數一樣錯誤。
Classes that serve as base classes in a multiple-inheritance hierarchy ordinarily should define their destructors to be virtual.
在多重繼承層次中作為基類的類通常應該將它們的析構函數數定義為虛函數。
Constructors called in the order of base-to-derived. However, the execution of destructors cannot be controlled by the programmer.
構造函數以基類到派生類的順序被調用。但是,析造函數不受程序員的控制。
Modifier can be used with classes, fields, methods, properties, and events, but cannot be used with destructors or types other than classes.
修飾符可與類、字段、方法、屬性和事件一起使用,但不能與析構函數或除類之外的類型一起使用。
The fact that destructors are run leads to an important programming technique that makes programs more exception safe .
對析構函數的運行導致一個重要的編程技術的出現,它使程序更為異常安全的。
Therefore, calls to these constructors and destructors must be performed by the run-time code.
因此,必須由運行時代碼執行對這些構造函數和析構函數的調用。
Add the methods, properties, fields, events, constructors (method), destructors (method), and constants that define the structure.
添加定義結構的方法、屬性、字段、事件、構造函數(方法)、析構函數(方法)和常量。
An interface cannot contain constants, fields, operators, instance constructors, destructors, or types.
接口不能包含常量、字段、運算符、實例構造函數、析構函數)或類型。
Interfaces have no constructors or destructors.
接口沒有構造器和析構器。
Destructors cannot be inherited or overloaded.
無法繼承或重載析構函數。
Destructors cannot be defined instructs.
不能在結構中定義析構函數。
Destructors are often executed during stack unwinding .
棧展開期間會經常執行析構函數。
Destructors for local objects are run; resources allocated by class-type objects ordinarily are freed by their destructor.
運行局部對象的析構函數,由類類型對象分配的資源通常由它們的析構函數釋放。
All the windows are automatically unregistered in their destructors.
所有窗口自動在它們的析構函數中去注冊。
Under a garbage collected environment, destructors to free memory are unnecessary.
在垃圾回收的環境下,不需要通過析構函數釋放內存。
Sometimes we need some destructors release the bad mood. No matter how, by myself is a very important thing.
有時我們需要釋放一些不好的心情,不管怎樣,一個人獨處是很重要的一件事。
The constructors for the individual objects in the array are not invoked, although the destructors are.
盡管調用了析構函數,但是未調用數組中各個對象的構造函數。
During stack unwinding, the memory used by local objects is freed and destructors for local objects of class type are run.
棧展開期間,釋放局部對象所用的內存并運行類類型局部對象的析構函數。
Avoid calling virtual functions in constructors and destructors.
避免在構造函數和析構函數中調用虛擬函數。
To resolve this, ensure that destructors called from Release methods only contain native code.
若要解決此問題,請確保從Release方法調用的析構函數僅包含本機代碼。
Part 2 of this series explains modeling C# indexers, properties, constructors, destructors, and operators.
本系列的第2部分將介紹C#指示器、屬性、構造方法、析構方法,和操作符的建模。
Destructors are used to destruct instances of classes.
析構函數用于析構類的實例。
Choose this option only if you are certain that all class constructors and destructors call virtual functions virtually.
僅在確定所有的類構造函數和析構函數實際調用虛函數時選擇此選項。
You should not use structured exception handling in functions that use objects with destructors.
您不應該在函式(使用有解構函式的物件)之中使用結構化的例外處理。
This was safe in our example above, because we required that T destructors never throw.
上面給出的我們的例子是安全的,因為我們要求T的析構函數決不會拋出異常。
Thus, the assertions can be used safely in destructors, too.
因此,也可以在析構函數中安全地使用斷言。
Finally, it's worth mentioning that it can be convenient to declare pure virtual destructors in some classes.
最后,值得提到的是在一些類中聲明純虛銷毀函數是很方便的。
Empty destructors should not be used.
不應使用空析構函數。
Destructors are also called when the program exits.
程序退出時也會調用析構函數。
Item 14: Make sure base classes have virtual destructors .
確保基類有虛銷毀函數。
Methods or destructors can have a negative impact on performance and you should avoid using them unnecessarily.
方法或析構函數對性能可能會有負面影響,因此應避免不必要地使用它們。
Destructors for base classes are an important exception to the Rule of Three ( Section 13. 3, p. 485).
基類析構函數是三法則(第13.3節)的一個重要例外。
When destructors are executing, the exception has been raised but not yet handled.
在執行析構函數的時候,已經引發了異常但還沒有處理它。
Using pool interfaces, you can choose to run their destructors or just drop them off into oblivion;
使用內存池接口,你可以選擇運行它們的析構函數,或者只是丟棄它們;
Managing exceptions in constructors and destructors
管理構造函數和析構函數中的異常
Modeling constructors and destructors
對構造方法和析構方法建模
It might result in leaks for classes with destructors that perform memory de-allocation;
如果類中包含執行內存釋放操作的析構函數,此缺陷可能導致泄漏;
Using Destructors to Release Resources
使用析構函數釋放資源