diff options
author | Tor Arne Vestbø <tor.arne.vestbo@nokia.com> | 2012-02-03 14:11:27 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-06 12:21:14 +0100 |
commit | 56db0a314ec66655cb56a4690775c58527288342 (patch) | |
tree | 43088a86894e59c93ac1df305862236bff36a27d | |
parent | 63ac4c6a4706637d9499210086f387b3849b6ad0 (diff) |
Don't start timers in the QDeclarativePixmapStore destructor
Timers use global static data, which might have been torn down at the
point where we start the timer.
Change-Id: Id11de05ae92b9a3652f9b1d7c3d5ca4947ffe065
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
-rw-r--r-- | src/quick/util/qdeclarativepixmapcache.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/quick/util/qdeclarativepixmapcache.cpp b/src/quick/util/qdeclarativepixmapcache.cpp index 6460136775..80359231d3 100644 --- a/src/quick/util/qdeclarativepixmapcache.cpp +++ b/src/quick/util/qdeclarativepixmapcache.cpp @@ -724,6 +724,11 @@ QDeclarativePixmapStore::~QDeclarativePixmapStore() int leakedPixmaps = 0; QList<QDeclarativePixmapData*> cachedData = m_cache.values(); + // Prevent unreferencePixmap() from assuming it needs to kick + // off the cache expiry timer, as we're shrinking the cache + // manually below after releasing all the pixmaps. + m_timerId = -2; + // unreference all (leaked) pixmaps foreach (QDeclarativePixmapData* pixmap, cachedData) { int currRefCount = pixmap->refCount; |