summaryrefslogtreecommitdiff
path: root/doc/src/snippets/code/doc_src_q3memarray.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2013-01-03 15:17:21 -0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-01-05 14:46:00 +0100
commit40e44d197777cf9a57189d0266540053d36f5ad7 (patch)
treea75d6ccaa59891010b4a92aa027a15a18163501e /doc/src/snippets/code/doc_src_q3memarray.cpp
parente90c65e609380c218ea25eada6fbdcad554f3ae7 (diff)
downloadqt4-tools-40e44d197777cf9a57189d0266540053d36f5ad7.tar.gz
Don't increase the reference count if dynamic_cast failed
If the dynamic_cast failed in QSharedPointer::dynamicCast or qSharedPointerDynamicCast, we should avoid creating the QSharedPointer that shares the weak and strong reference counts. In Qt 5, this does not imply a leak since the original pointer is stored internally for deletion. In Qt 4 it implies a leak under certain circumstances, which this change fixes. Task-number: QTBUG-28924 Change-Id: Id2de140de4cf676461e14b201ad250c53666b79d (cherry-picked from qt5 commit a094bf5a893c3cccffff10c1420bfbe3a3c02a7c) Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'doc/src/snippets/code/doc_src_q3memarray.cpp')
0 files changed, 0 insertions, 0 deletions