3 ms·
You don't need weak references. Just use strong ones.
by pcwalton 10y ago
You don't need weak references. Just use strong ones.
- Animats 10y agoThen you have an ownership loop.
- pcwalton 10y agoI meant reference counted strong pointers. Non-reference counted weak pointers make no sense from a systems point of view: in order to be memory safe you have to track the number of outstanding pointers, which is effectively a reference count, so you might as well be honest and use a real reference count.