3 ms·
No, GCs can handle cyclic references. You don't need weak references merely in order to ensure that a cyclic structure is eventually freed once it's become inac
by foldr 9y ago
No, GCs can handle cyclic references. You don't need weak references merely in order to ensure that a cyclic structure is eventually freed once it's become inaccessible. That's not to say that there might not sometimes be good reasons for using weak references in a GCed language, however.