When is an object subject to garbage collection

An object is subject to garbage collection when it becomes unreachable to the program inwhich it is used.

Showing Answers 1 - 1 of 1 Answers

When an object becomes unreachable to any of the code then that object becomes eligible for garbage collection.
Once an object is garbage collected, It can no longer become reachable again.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions