Details
-
Suggestion
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
5.12.3
-
None
Description
In modern C++, it is very common to use smart pointer for memory management and autodeletion by QObject parent prevents adoption of smart pointer.
For instance, I have to make my class inherit QObject to use signal, and once I make my type as a derived type of OQbject, I cannot share my type using QSharedPointer or std::shared_ptr and I have to care accidental deletion by parent which is very annoying.
Maybe memory management by parent-child relation was helpful for old times C++.
However, I think it's an obstacle for modernizing C++ source code using Qt for now.