On Sat, Jun 4, 2016 at 6:48 PM, Konstantin Tokarev <annu...@yandex.ru> wrote: > > 04.06.2016, 18:10, "charleyb123 ." <charleyb...@gmail.com>: > > This is to free the developer from considering implications of (2). > > I disagree, (2) is still present as the choice of make-function. It's up > to you to decide if it will be Foo(...), std::make_shared<Foo>(...), > std::make_unique<Foo>(...), or something else.
Perhaps, however by using make_shared you're basically saying the object manages its own lifetime and there's no notion of ownership transfer (i.e. you can't tell all shared pointers to detach from that object at once). This basically leads only to working around Qt's ownership system and ultimately making trouble for yourself (e.g. this thread on the Qt forum http://forum.qt.io/topic/66639/qcamera-stop-hangs-or-causes-a-crash-how-to-deinit-the-camera-properly ). Kind regards.
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest