3 ms·
> For example, it can be very handy in many situations for a contained object to have a back-pointer to its container. Does it frequently need an owning refere
by vlovich123 1y ago
> For example, it can be very handy in many situations for a contained object to have a back-pointer to its container.
Does it frequently need an owning reference though or would a weak reference suffice? Usually the latter situation suffices.
- lisper 1y agoA fair point, but then you're still putting the burden on the programmer to figure out where a weak reference is appropriate. But then I'll just choose a different example, like a general graph.