Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

finalize() method - a few questions and doubt

 
Jason Mills
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am referring to 2 minutes drill points on finalize() from K & B ..."you can uneligibilize the object for GC from within the finalize() method"

since there is NO guarantee that this method will ever run,

A) why do you want to do this?
B) Let us I want to do this, can you tell me the situation where you want to do this?

I am now refering to second point in "Tricky litle finalize() Gotcha's

A) I quite did not get it, can you please eloborate?

Thanks a lot
 
wise owen
Ranch Hand
Posts: 2023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Object finalization and cleanup
 
Jason Mills
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
very helpful information.

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic