Solved QPointer, QSharedPointer and QWeakPointer - When it's perfect solution when it's not?
Just got curious about situation when using of QPointer, QSharedPointer or QWeakPointer is perfect solution and when it's not. Suggestions?
Chris Kawa Moderators last edited by
QPointerwhen you want to observe QObject's lifetime.
QSharedPointerwhen you share ownership of an object (last owner deletes the object)
QWeakPointerwhen you want to observe lifetime of an object owned by shared pointers.
@Chris-Kawa Thx. Looks very similar to Objective-C pointers ... Issue closed.