析构器 (finalizer),计算机语言中的析构函数,当一个对象在消亡的时候,由编译器自动调用。
Destructor析构器(Destructor)是在对象没有被引用的时候,由CLR自动调用的。任何包含非托管资源的类都必须定义析构器来释放这些资源,因为它们并不会在对象消亡...
基于216个网页-相关网页
掌握 C++构造器(Constructor)和析构器(De-Constructor)的定义和使用方法; 3. 提前写出程序源代码,设计实验测试用的输入数据,预计输出结果。
基于8个网页-相关网页
...构造器初始化handle句柄 public OSHandle(IntPtr handle) {this.handle = handle; }//当垃圾收集执行时,下面的析构器(Finalize)方法将被调用//经编译后,该方法实际被更名为Finalize方法 ~OSHandle() { Dispose(false); }//该方法可被显式调用来关闭非托管资...
基于1个网页-相关网页
析构函数、析构器 destructor
生物分子结构分析仪器 molecular structure instruments
结构分析器 structural descriptor ; Structural Analyzer
这可能导致早先约束到该名字的对象的引用计数降为零,导致释放该对象的分配空间并调用其析构器,如果它有一个的话。
This may cause the reference count for the object previously bound to the name to reach zero, causing the object to be deallocated and its destructor (if it has one) to be called.
那些支持析构函数或垃圾收集器的语言通过在C接口上作一层封装有助于降低这个问题发生的概率。
Programming languages that support destructors or have a garbage collector may mitigate this problem by making a wrapper over the C interface.
程序员无法控制何时调用析构函数,因为这是由垃圾回收器决定的。
The programmer has no control over when the destructor is called because this is determined by the garbage collector.
应用推荐