Release pixmap cache data to avoid leaking memory
authorChris Adams <christopher.adams@nokia.com>
Mon, 21 Nov 2011 23:59:33 +0000 (09:59 +1000)
committerQt by Nokia <qt-info@nokia.com>
Thu, 1 Dec 2011 05:31:51 +0000 (06:31 +0100)
commitb99c9490c398fb4d285d5f28edd553445b76d79f
treefe910b6664e6e60acbe08933aa1721f14106691d
parent8a338a3bba898b6bacd0f18f783aaaab64877070
Release pixmap cache data to avoid leaking memory

Previously, QDeclarativePixmapStore did not release cache entries on
destruction.  This commit ensures that all cache entries are released
properly.  Note that while any QDeclarativePixmapData which contains
a texture will be deleted, the texture itself will be scheduled for
cleanup rather than released directly.

Task-number: QTBUG-22742
Change-Id: I62ddf57f2b55b732ab369321eb9ed0d7af01c135
Reviewed-by: Martin Jones <martin.jones@nokia.com>
src/declarative/util/qdeclarativepixmapcache.cpp
src/declarative/util/qdeclarativepixmapcache_p.h
tests/auto/declarative/qdeclarativepixmapcache/data/dataLeak.qml [new file with mode: 0644]
tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp