Fixed memory leak from previos revision

This commit is contained in:
2008-03-06 18:16:00 +00:00
parent 7333ca5c6c
commit d7cc40cf2b
+3 -2
View File
@@ -105,6 +105,7 @@
#include <fcntl.h> #include <fcntl.h>
#include <errno.h> #include <errno.h>
#include <time.h> #include <time.h>
#include <memory.h>
#include <algorithm> #include <algorithm>
@@ -334,9 +335,9 @@ void FWWindow::fileSaveActionSetEn(bool en)
void FWWindow::fileOpen() void FWWindow::fileOpen()
{ {
ProjectPanel *proj = newProjectPanel(); std::auto_ptr<ProjectPanel> proj(newProjectPanel());
if (proj->fileOpen()) if (proj->fileOpen())
showSub(proj); showSub(proj.release());
} }
void FWWindow::fileClose() void FWWindow::fileClose()