diff options
author | Yotam Barnoy | 2010-10-27 11:09:03 +0000 |
---|---|---|
committer | Yotam Barnoy | 2010-10-27 11:09:03 +0000 |
commit | 13b6e0d69a041a4598b12cd92fbf2c00a347b932 (patch) | |
tree | c9fc1f05f235885c8ea8a666ade8c3fbfe70ac94 /backends | |
parent | 415f9a1b0b510dead1c0c8afa17d42c7065541c0 (diff) | |
download | scummvm-rg350-13b6e0d69a041a4598b12cd92fbf2c00a347b932.tar.gz scummvm-rg350-13b6e0d69a041a4598b12cd92fbf2c00a347b932.tar.bz2 scummvm-rg350-13b6e0d69a041a4598b12cd92fbf2c00a347b932.zip |
PSP: Fixed ImageViewer code to deallocate TimedMessageDialog
Not deallocating it before loading the next image causes fragmentation in memory which eventually prevents big things from being loaded into memory.
svn-id: r53873
Diffstat (limited to 'backends')
-rw-r--r-- | backends/platform/psp/image_viewer.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/backends/platform/psp/image_viewer.cpp b/backends/platform/psp/image_viewer.cpp index dbcafd3898..66512e450b 100644 --- a/backends/platform/psp/image_viewer.cpp +++ b/backends/platform/psp/image_viewer.cpp @@ -145,8 +145,10 @@ void ImageViewer::setVisible(bool visible) { _visible = true; setViewerButtons(true); - GUI::TimedMessageDialog dialog("Image Viewer", 1000); - dialog.runModal(); + { // so dialog goes out of scope, destroying all allocations + GUI::TimedMessageDialog dialog("Image Viewer", 1000); + dialog.runModal(); + } runLoop(); // only listen to viewer events } else { // we were asked to make invisible or failed to load |