终结
终结(Finalization) 既然我们已经用简化的分配模型讨论了几个主题,我想使事情变得复杂一点,以便我们可以讨论一个更重要的现象,这就是终结器(fina...
关于析构
关于析构(Finalization)-.NET教程,评论及其他
终止化
终止化(Finalization)是CLR提供的允许对象在垃圾收集器回收对象内存之前能够优雅的执行清理工作的机制;
完成部分
完成部分(Finalization)是初始化过程的反过程,只要单元有初始化部分,才会有完成部分。完成部分对应在Delphi1.0中ExitProc和AddEXitProc函数。
终结,结束;终止化
completion / close / finish / termination
In object-oriented programming, finalization is the process of preparing an object for deallocation; strictly speaking, finalization is all parts of object destruction until memory deallocation itself. Finalization is formally complementary to initialization, which is the part of object creation that follows allocation, but differs significantly in practice – see contrast with initialization. Finalization fulfills a similar role as finally in exception handling; in general these are unrelated, but in some cases the behavior is identical, and the case of finally in a coroutine can be considered a form of finalization – see connection with finally. The term "final" is also used to indicate a class that cannot be inherited; this is unrelated.Finalization varies significantly between languages and between implementations of a language, depending on memory management method, and can generally be partially controlled per-object or per-class by a user-specified finalizer or destructor, unlike deallocation. The terms "finalization" and "finalizer" are primarily used in languages with garbage collection, especially with non-deterministic object lifetimes, like Java; while "destruction" and "destructor" are used for languages with deterministic object lifetimes, like C++. This article addresses finalization in the broad sense, regardless of object lifetime or memory management method, but distinguishes how finalization differs depending on these.