[Interest] What's the recommended way to put QObjects in smart pointers?
Nikos Chantziaras
realnc at gmail.com
Fri May 6 12:57:04 CEST 2016
On 05/05/16 07:19, Thiago Macieira wrote:
> On quinta-feira, 5 de maio de 2016 04:24:48 PDT Nikos Chantziaras wrote:
>>> So what are you requirements? Do you want to a container that does delete
>>> the object it has, unless the parent has already deleted it?
>>
>> Well, basically what I want is not having even a single 'new' or
>> 'delete' anywhere in my code. I already achieved that with all my non-Qt
>> projects.
>
> If you don't want to use new or delete, use stack-based objects and only
> create children objects as members. That is, what Nye suggested.
The parents may delete them, and the children may have other children
they might delete.
More information about the Interest
mailing list