destructors

destructors

 英

  • n.〈英〉垃圾焚化爐;破壞器;爆破裝置
  • 網絡析構函數;析構器;解構式

詞形變化

復數:destructors  

英漢解釋

n.
1.
〈英〉垃圾焚化爐
2.
破壞器;爆破裝置

英英解釋

n.

例句

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

使用函數釋放資源

熱門查詢