This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Beginning Java and the fly likes Release of objects Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Release of objects" Watch "Release of objects" New topic
Author

Release of objects

Aravind JAI
Greenhorn

Joined: Feb 06, 2006
Posts: 18
How to Release the used objects in java program
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
You don't. That is the job of the garbage collector.

Why do you ask?


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Jaime M. Tovar
Ranch Hand

Joined: Mar 28, 2005
Posts: 133
When other objects do not reference an object any more it becomes a candidate for garbage collection.


She will remember your heart when men are fairy tales in books written by rabbits.<br /> As long as there is duct tape... there is also hope.
Michael Ernest
High Plains Drifter
Sheriff

Joined: Oct 25, 2000
Posts: 7292


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.


Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Release of objects