bugfix: window preview memory leak

This commit is contained in:
Hualet Wang 2015-06-25 19:54:55 +08:00
parent dd11cf57d1
commit 3aab5936a1

View File

@ -72,10 +72,11 @@ void WindowPreview::updateCache()
cache.setPixel(x, y, pixel); cache.setPixel(x, y, pixel);
} }
} }
XDestroyImage(image);
cache = cache.scaledToWidth(width(), Qt::SmoothTransformation); QImage cacheScaled = cache.scaledToWidth(width(), Qt::SmoothTransformation);
m_cache = new QImage(cacheScaled);
m_cache = new QImage(cache);
} }
} }
} }