What is the purpose of Finalization in java?
- by Karthik
Different websites are giving different opinions.
My understanding is this:
To clean up or reclaim the memory that an object occupies, the Garbage collector comes into action. (automatically is invoked???)
The garbage collector then dereferences the object. Sometimes, there is no way for the garbage collector to access the object. Then finalize is invoked to do a final clean up processing after which the garbage collector can be invoked.
is this right?