Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Why is the runFinalizersOnExit method in class System depricated?  RSS feed

Sohail Hirani
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The explaination given for deprication of runFinalizersOnExit in System class is that "It may result in finalizers being called on live objects while other threads are concurrently manipulating those objects, resulting in erratic behavior or deadlock". But the finalizers are supposed to be called only when the Java runtime exits. The confusion I have is once the java runtime exits we should not have any live objects hence the aboue case should not arise or have i missed some details. Please help.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!