GUI: Free up original images after loading thumbs
This commit is contained in:
parent
bf7c05b265
commit
a643f12eab
1 changed files with 6 additions and 0 deletions
|
@ -264,6 +264,8 @@ GridWidget::GridWidget(GuiObject *boss, int x, int y, int w, int h)
|
|||
if (surf) {
|
||||
const Graphics::ManagedSurface *scSurf(scaleGfx(surf, _thumbnailWidth, 512));
|
||||
_loadedSurfaces[String("placeholder")] = scSurf;
|
||||
surf->free();
|
||||
delete surf;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -292,6 +294,8 @@ GridWidget::GridWidget(GuiObject *boss, const String &name)
|
|||
if (surf) {
|
||||
const Graphics::ManagedSurface *scSurf(scaleGfx(surf, _thumbnailWidth, 512));
|
||||
_loadedSurfaces[String("placeholder")] = scSurf;
|
||||
surf->free();
|
||||
delete surf;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -360,6 +364,8 @@ void GridWidget::reloadThumbnails() {
|
|||
if (surf) {
|
||||
const Graphics::ManagedSurface *scSurf(scaleGfx(surf, _thumbnailWidth, 512));
|
||||
_loadedSurfaces[path] = scSurf;
|
||||
surf->free();
|
||||
delete surf;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue