• 管理构造函数和析构函数中的异常

    Managing exceptions in constructors and destructors

    youdao

  • 因此,也可以在析构函数中安全地使用断言。

    Thus, the assertions can be used safely in destructors, too.

    youdao

  • 因为它没有一个析构函数。

    Because it does not have a destructor.

    youdao

  • 队列类的构造函数和析构函数负责创建和销毁互斥锁,见清单1。

    The constructor and destructor of the queue class are responsible for the creation and destruction of the mutex, as shown in Listing 1.

    youdao

  • 对于实现了析构函数释放非内存资源的对象来说,这是最常见的问题。

    This is mostly a problem with objects that implement a destructor to free non-memory resources.

    youdao

  • 应该忽略析构函数中的异常吗?

    Should the exception in the destructor be ignored?

    youdao

  • 栈展开期间会经常执行析构函数。

    Destructors are often executed during stack unwinding.

    youdao

  • 程序退出时也会调用析构函数。

    Destructors are also called when the program exits.

    youdao

  • 一个类只能有一个析构函数。

    A class can only have one destructor.

    youdao

  • 如果出现异常,则无法调用析构函数。

    If an exception occurs, the destructor cannot be called.

    youdao

  • 类,构造函数和析构函数,类的指针。

    Classes. Constructors and Destructors. Pointers to classes.

    youdao

  • 如果析构函数为空,只会导致性能降低。

    If the destructor is empty, this simply results in a loss of performance.

    youdao

  • 另外析构函数也不仅仅是用来释放资源。

    A destructor is not limited only to relinquishing resources.

    youdao

  • 无法继承或重载析构函数。

    Destructors cannot be inherited or overloaded.

    youdao

  • 首先,调用将要被删除的对象的析构函数。

    First, the destructor of the object that's being deleted is called.

    youdao

  • 不应使用空析构函数。

    Empty destructors should not be used.

    youdao

  • 如果存在析构函数,则将其重写为类终结器。

    If a destructor is present, rewrite that to be the class finalizer.

    youdao

  • 尽管析构函数是一种方法,但它不能有参数。

    Although a destructor is a method, it cannot have parameters.

    youdao

  • 构造函数和析构函数是面向对象程序设计中的难点。

    The construction function and the destruction function are difficult parts in object-oriented programming design.

    youdao

  • 调用析构函数时,将调用垃圾回收器来处理该队列。

    When the destructor is called, the garbage collector is invoked to process the queue.

    youdao

  • 例如,无法在析构函数或终结器上请求一个新的槽。

    For example, a new slot cannot be requested on a destructor or finalizer.

    youdao

  • 与析构函数不同,构造函数内部所做的事情经常会抛出异常。

    Unlike destructors, it is often the case that something done inside a constructor might throw an exception.

    youdao

  • 尽管调用了析构函数,但是未调用数组中各个对象的构造函数。

    The constructors for the individual objects in the array are not invoked, although the destructors are.

    youdao

  • 结构不能声明默认构造函数(没有参数的构造函数)或析构函数。

    A struct may not declare a default constructor (a constructor without parameters) or a destructor.

    youdao

  • 在使用具有析构函数的对象的函数中,不应使用结构化异常处理。

    You should not use structured exception handling in functions that use objects with destructors.

    youdao

  • 程序员无法控制何时调用析构函数,因为这是由垃圾回收器决定的。

    The programmer has no control over when the destructor is called because this is determined by the garbage collector.

    youdao

  • 接口不能包含常量、字段、运算符、实例构造函数、析构函数或类型。

    An interface cannot contain constants, fields, operators, instance constructors, destructors, or types.

    youdao

  • 接口不能包含常量、字段、运算符、实例构造函数、析构函数或类型。

    An interface cannot contain constants, fields, operators, instance constructors, destructors, or types.

    youdao

$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定