Hi, The Garbage collector will invoke automatically for every reggular intervals of time (i.e for every 31 sec).if you don't use your object up to that min time the grabagecollector will remove it from heap and reclaim the memory which is occupied by your object. If you want more information about GC plz have a glance at Thinking in Java.
Reddy : if you don't use your object up to that min time the grabagecollector will remove it from heap and reclaim the memory which is occupied by your object.
Is it so ?
The garbage collector will reclaim the memory only when the object is not referenced by any active threads . If an active thread has reference to any of the object that will not be GC'd.
Also we cant force the JVM to do the garbage collection, even if you call System.GC() it's uncertain that the objects that are eligible for garbage collection will be removed from heap. [ September 15, 2005: Message edited by: Srinivasa Raghavan ]
Originally posted by jeevan saini: urai pandiga, what a stupid question did u ask us nobody will respond to u. stop sending such question and buy one complete refernce and learn some tips from ur frnz like jeens
Jeevan, Please try to post in english, as this thread is for international readership.