aspose file tools
The moose likes Beginning Java and the fly likes How many Objects are garbage collected? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "How many Objects are garbage collected?" Watch "How many Objects are garbage collected?" New topic
Author

How many Objects are garbage collected?

Thomas Markl
Ranch Hand

Joined: Mar 08, 2001
Posts: 192

C:\Java\EigeneJavaProgramme>java GarbageCollector1
i2 == i1: true
i1 =null i2 =null
I think 2 objects (Integer(1) and Integer(2) are eligable for gc.
Is it correct?
Bert Bates
author
Sheriff

Joined: Oct 14, 2002
Posts: 8712
Thomas -
unless you've buried something tricky in there somewhere, you are right - two objects are g.c. eligible.


Eliminate fossil fuel subsidies. (If you're not on the edge, you're taking up too much room.)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How many Objects are garbage collected?
 
Similar Threads
Accessing Weakly Referenced Objects
Clarification on Garbage Collection
Object References & GC
What is the diff. b/w "==" and ".equals( )" Operators