[Interest] QHash memory management

Dmitriy Purgin dpurgin at gmail.com
Wed Aug 6 04:41:59 CEST 2014


Hi,

take a look at qDeleteAll() function:

http://qt-project.org/doc/qt-5/qtalgorithms.html

Cheers

2014-08-06 3:50 GMT+06:00 Giuseppe D'Angelo <dangelog at gmail.com>:
> On 5 August 2014 23:24, preeteesh kakkar <preeteesh.kakkar at gmail.com> wrote:
>> Yes, you do need to delete them. You can keep them as scoped_ptr instead of
>> raw pointer.
>
> You can't use scoped / unique ptr inside of a Qt container because
> they're not copiable. A shared pointer works, though.
>
> --
> Giuseppe D'Angelo
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest



More information about the Interest mailing list