Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Release of objects

 
Aravind JAI
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to Release the used objects in java program
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't. That is the job of the garbage collector.

Why do you ask?
 
Jaime M. Tovar
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When other objects do not reference an object any more it becomes a candidate for garbage collection.
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Assuming there are no remaining references to an object in memory, the garbage collector will "scope" it for removal.

Transferring this topic to the Beginner forum.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic