#13 Added support for QSharedPointer to prevent memory leaks.