Science, asked by lakvermamimin, 1 year ago

when are weak references garbage collected

Answers

Answered by Anonymous
0
Yes it can, that is exactly how weak references are designed to work. The weak reference is the root that your object has to the application, even though the object may have other strong references it is the root reference that matters and since the root reference is a weak reference the object will be a candidate for garbage collection.
Similar questions