JavaSystem.RunFinalizersOnExit(Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Caution
deprecated
Enable or disable finalization on exit; doing so specifies that the finalizers of all objects that have finalizers that have not yet been automatically invoked are to be run before the Java runtime exits.
[Android.Runtime.Register("runFinalizersOnExit", "(Z)V", "")]
[System.Obsolete("deprecated")]
public static void RunFinalizersOnExit (bool value);
[<Android.Runtime.Register("runFinalizersOnExit", "(Z)V", "")>]
[<System.Obsolete("deprecated")>]
static member RunFinalizersOnExit : bool -> unit
Parameters
- value
- Boolean
indicating enabling or disabling of finalization
- Attributes
Remarks
Enable or disable finalization on exit; doing so specifies that the finalizers of all objects that have finalizers that have not yet been automatically invoked are to be run before the Java runtime exits. By default, finalization on exit is disabled.
If there is a security manager, its checkExit
method is first called with 0 as its argument to ensure the exit is allowed. This could result in a SecurityException.
This member is deprecated. This method is inherently unsafe. It may result in finalizers being called on live objects while other threads are concurrently manipulating those objects, resulting in erratic behavior or deadlock.
Added in JDK1.1.
Java documentation for java.lang.System.runFinalizersOnExit(boolean)
.
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.