Il 03/05/19 23:03, Иван Комиссаров ha scritto:

I’d say it’s an implementation detail - it *is* possible to implement the creation of QObjects more efficient than it is done now without «forcing» user to use objects on stack to avoid allocations.

Unless you also sacrifice binary compatibility, it's not possible.

What it is possible is to have one allocation instead of 2 (the object and its dpointer), that's already been worked upon with a custom operator new, check the patches on gerrit.

Anyhow this is entirely orthogonal to the original problem at hand: ownership. We need to support the case of objects created on the stack (not owned and owned).

Cheers,
--
Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts

Attachment: smime.p7s
Description: Firma crittografica S/MIME

_______________________________________________
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development

Reply via email to