3 ms·
It's not really worse than heap allocated objects. For them you also need to make sure the pointer in the list does not outlive the actual object. The only saf
by Matthias247 5y ago
It's not really worse than heap allocated objects. For them you also need to make sure the pointer in the list does not outlive the actual object.
The only safe structures are heap allocated plus reference counted ones, where inserting something into a list also increments the refcount.
- loeg 5y agoI think you're completely correct, in a pedantic sense. However, heap object lifetimes aren't bound to control flow in quite the same way.