>> Can you explain what you mean with “understands the parent/child-ownership >> model”? >> >> Are you suggesting a unique_ptr-like template class that doesn’t destroy the >> object in its destructor if that object still has a parent? > > It could be something like that. One option could be to behave like a > unique_ptr if the object doesn’t have a parent, and like a weak pointer > otherwise. One would have to try it out though, to see whether that would > give semantics that are intuitive and feel right to users.
Intuitive behavior would be to behave like weak pointer if object has a parent and is a direct class member of its parent object, otherwise behave like a unique_ptr. -- Regards, Konstantin _______________________________________________ Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development