5 lines
361 B
Plaintext
5 lines
361 B
Plaintext
Enabling `runFinalizersOnExit` is unsafe as it might result in erratic behavior and deadlocks on application exit.
|
|
|
|
Indeed, finalizers might be force-called on live objects while other threads are concurrently manipulating them.
|
|
|
|
Instead, if you want to execute something when the virtual machine begins its shutdown sequence, you should attach a shutdown hook. |