mirror of https://github.com/procxx/kepka.git
Optimize image destruction.
No need to call _source->unload(), it leads to saving to PNG.
This commit is contained in:
parent
a37138aa52
commit
61647275e8
|
@ -1011,7 +1011,9 @@ void Image::invalidateSizeCache() const {
|
|||
|
||||
Image::~Image() {
|
||||
if (this != Empty() && this != BlankMedia()) {
|
||||
unload();
|
||||
invalidateSizeCache();
|
||||
ActiveCache().decrement(ComputeUsage(_data));
|
||||
_data = QImage();
|
||||
ActiveCache().remove(this);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue