Share via


JavaSystem.RunFinalization Method

Definition

Runs the finalization methods of any objects pending finalization.

[Android.Runtime.Register("runFinalization", "()V", "")]
public static void RunFinalization ();
[<Android.Runtime.Register("runFinalization", "()V", "")>]
static member RunFinalization : unit -> unit
Attributes

Remarks

Runs the finalization methods of any objects pending finalization.

Calling this method suggests that the Java Virtual Machine expend effort toward running the finalize methods of objects that have been found to be discarded but whose finalize methods have not yet been run. When control returns from the method call, the Java Virtual Machine has made a best effort to complete all outstanding finalizations.

The call System.runFinalization() is effectively equivalent to the call: <blockquote>

Runtime.getRuntime().runFinalization()

</blockquote>

Java documentation for java.lang.System.runFinalization().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to