• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Garbage Collection

 
Mubeen Shaik
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I am new to Java and I am confused Garbage Collection. Please explain me this with some good example.
I want to know when exactly GC will be occur? Also want to know more about finalize() method.

Thanks in advance,
Mubeen Shaik.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to know when exactly GC will be occur?
You can't. You're not intended to be able to do so.
Also want to know more about finalize() method.
What do you want to know? Perhaps you want to read the explanation contained in the Object class documentation.
You might also like a read of Section 12.6 Finalization of Class Instances of the Java Language Specification.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, JavaWorld has a number of articles on garbage collection, which may interest you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic