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>
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;