Hi,
I am confused, why JVM is providing its own garbage collector to programmer. If we call gc() explicitly and it will get decided by JVM whether to call it or not. Then what is the use of it for programmer. Is JVM is not smart enough to handle the gc() call when going out of memory. i.e. (OutOfMemoryException)

If I write a code and I have doubt that memory is not available i need to handle exception in that case. And I (programmer) need to call gc() method to free some memory from objects eligible for garbage collection. If JVM is smart enough it should handle OutOfMemoryException it self and call gc() method.

  One more doubt. Does JVM call gc() before throwing OutOfMemoryException.

--
With Regards,
Shiv Shankar

--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en

Reply via email to