Forums Register Login

Garbage collection?

+Pie Number of slices to send: Send


here i thought the answer to be 2..

but its not ...can anyone explain me when does the object gets garbage collected exactly??


srikanth
+Pie Number of slices to send: Send
Never in that method . Answer 'c' because , eventhough 'b' is set to null
the reference variable c points to this object and it is returned to the calling place.
[ September 22, 2005: Message edited by: Srinivasa Raghavan ]
+Pie Number of slices to send: Send
Because it is having direct reference (c), it is never garbage collected.
+Pie Number of slices to send: Send
yes srinivas,

got it ..thanks for your help
There will be plenty of time to discuss your objections when and if you return. The cargo is this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 682 times.
Similar Threads
GC
GC ??
garbage collection
Unfair Question on JQ
GC
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 19:02:05.