On sexta-feira, 19 de julho de 2013 23.31.48, Constantin Makshin wrote:
> QSharedPointer is good when you want to use the same object in several
> places without the need to worry about that object's lifetime because the
> [automatic] reference counting takes care of that. Another advantage is
> that it can hold an object of any type, not just ones derived from
> QSharedData. But if C++11 is acceptable for the project, I'd prefer
> std::shared_ptr because of std::make_shared which provides more efficient
> and exception-friendly allocation method.

QSharedPointer::create().

Also exception-safe.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to