> This might be used where a base class manages the lifetime of a resource and other types in the hierarchy operate on that - and so need the resource to be "alive" even during their destruction.
Confused, isn't that already the case normally? Base classes are already destroyed after derived classes, and owning pointers die before their targets.
Confused, isn't that already the case normally? Base classes are already destroyed after derived classes, and owning pointers die before their targets.