Without keyword "new":
Qt Code:
QList<QPixmap> thumbnails; ... // qDeleteAll(thumbnails); // remove this thumbnails.clear(); ... thumbnails += image;To copy to clipboard, switch view to plain text mode
Without keyword "new":
Qt Code:
QList<QPixmap> thumbnails; ... // qDeleteAll(thumbnails); // remove this thumbnails.clear(); ... thumbnails += image;To copy to clipboard, switch view to plain text mode
J-P Nurmi
timothy.crosley (14th August 2007)
I should have known what you meant. Sadly this still doesn't fix the memory leak(I actually had it this way originally). I have been trying to fix this bug for 3 days now and its driving me insane
.
~Timothy
Since you mentioned the QPixmapCache, what does QPixmapCache::cacheLimit () return.
timothy.crosley (14th August 2007)
It returns 1024.
If you have the possibility, step in the QPixmap destructor and see if it deletes the data member.
Qt Code:
{ if(data && data->deref()) { // Destroy image if last ref if (qt_pixmap_cleanup_hook_64) qt_pixmap_cleanup_hook_64(cacheKey()); delete data; data = 0; } }[/B]To copy to clipboard, switch view to plain text mode
Regards
timothy.crosley (14th August 2007)
What was the problem and how was it solved in the end?
Edit: Oh, sorry. I didn't notice the first post being modified..![]()
Last edited by jpn; 15th August 2007 at 22:05.
J-P Nurmi
Bookmarks