Jan tenpas wrote:When line 16 is reached, how many objects will be eligible for garbage collection?
Stephan van Hulst wrote:Harry, sorry for nitpicking (again), but objects may be eligible for collection even if they have references to them. What you mean is *reachable references*, which is an important difference. If two objects reference eachother, but nothing else does, they may still be garbage collected because they are not reachable.
Uh oh, we're definitely being carded. Here, show him this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koophttps://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton