14.06.2016, 18:03, "Bo Thorsen" <[email protected]>:
> Den 13-06-2016 kl. 12:16 skrev Denis Shienkov:
>>>  QScopedPointer?
>>
>>  Do you have real example? ;)
>
> Well, as Sean wrote it lacks the move, but if all you're after is to use
> it for a pointer in a class or make a local dynamically allocated var
> exception safe, then QScopedPointer is fine. It's limited in it's use,
> but that doesn't mean it's unusable.

QScopedPointer lacks custom deleters which make it unusable for the purpose of 
managing Windows HANDLEs (see original post).

However, author of [1] argues that managing non-pointer resources with 
unique_ptr + custom deleter is sub-par, and proposes different approach based 
on explicit specialization

[1] http://accu.org/index.php/journals/2086

-- 
Regards,
Konstantin
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to