On 04/05/16 18:00, Sean Harmer wrote:
On Wednesday 04 May 2016 17:48:50 Nikos Chantziaras wrote:
Is there a Qt-specific idiom where I can manage QObjects that have a
parent with a smart pointer and not have to worry about double-deletion?
Or, to phrase it in another way, is there a way to eliminate the 'new'
keyword completely from my code-base when using QObjects with a parent?
Use smart pointers to only manage the root objects of your QObject hierarchies
and rely upon QObject to manage the child objects.
That's not good enough. I need to delete objects way before their parent
is deleted. Otherwise, for all intents and purposes, I'm leaking memory.
_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest