Bill barrett wrote:My disconnect with the ch3 q11 is that three of the four objects created were set to null. Isn't it the null objects that are eligible for GC?
At line 16, there is still one object that can be reached, therefore it is not eligible for GC.
Sergej Smoljanov wrote:Roel De Nijs you are great
Sergej Smoljanov wrote:also paint way creation:
Wagner Fonseca wrote:I am still confused.
Wagner Fonseca wrote:I am still confused.
And the Beta object referenced in a2.b2?
The reference variable b2 is null, but still reference variable a2.b2 still refer to b2, this means which still the object live on the heap?
Wagner Fonseca wrote:Alpha.b1 is instance variable static
“The strongest of all warriors are these two — Time and Patience.” ― Leo Tolstoy, War and Peace
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|