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

使用函数释放资源

热门查询