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
This commit is contained in:
parent
415f9a1b0b
commit
13b6e0d69a
1 changed files with 4 additions and 2 deletions
|
@ -145,8 +145,10 @@ void ImageViewer::setVisible(bool visible) {
|
||||||
_visible = true;
|
_visible = true;
|
||||||
setViewerButtons(true);
|
setViewerButtons(true);
|
||||||
|
|
||||||
|
{ // so dialog goes out of scope, destroying all allocations
|
||||||
GUI::TimedMessageDialog dialog("Image Viewer", 1000);
|
GUI::TimedMessageDialog dialog("Image Viewer", 1000);
|
||||||
dialog.runModal();
|
dialog.runModal();
|
||||||
|
}
|
||||||
|
|
||||||
runLoop(); // only listen to viewer events
|
runLoop(); // only listen to viewer events
|
||||||
} else { // we were asked to make invisible or failed to load
|
} else { // we were asked to make invisible or failed to load
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue