Component.Finalize 方法


在通过垃圾回收将 Component 回收之前,释放非托管资源并执行其他清理操作。Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection.

!Component ()
~Component ();
override this.Finalize : unit -> unit
Finalize ()


此方法重写 FinalizeThis method overrides Finalize. 应用程序代码不应调用此方法;在垃圾回收过程中会自动调用对象的 Finalize 方法,除非已通过调用 SuppressFinalize 方法禁用了垃圾回收器终止。Application code should not call this method; an object's Finalize method is automatically invoked during garbage collection, unless finalization by the garbage collector has been disabled by a call to the SuppressFinalize method.

有关详细信息,请参阅Finalize 方法和析构函数清理非托管资源重写 Finalize 方法For more information, see Finalize Methods and Destructors, Cleaning Up Unmanaged Resources, and Overriding the Finalize Method.