[Development] The future of smart pointers in Qt API

Konstantin Shegunov kshegunov at gmail.com
Tue Feb 4 13:22:01 CET 2020


On Tue, Feb 4, 2020 at 12:15 PM Vitaly Fanaskov <vitaly.fanaskov at qt.io>
wrote:

> I think, if we decide to re-implement parent-child model using smart
> pointers, we would not use unique pointers at all. Even in a methods
> like QObject::makeChild (because ownership is already defined). Shared +
> weak pointers make perfect sense here.


You have to be really crafty. Allocating on the stack is a thing, you know,
even for parent-child trees, so how do you intend to handle that? Are we
again in "forget the stack and new everything" land?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20200204/3ba668ab/attachment.html>


More information about the Development mailing list