From d5513c3b5890be1b3688fb49fb2d6af2b4a590fe Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 6 Oct 2013 12:49:39 -0700 Subject: [PATCH] Delete SimpleGLWindow near where it's new'd. This makes it clearer and more foolproof. --- Windows/GEDebugger/GEDebugger.cpp | 3 --- Windows/GEDebugger/SimpleGLWindow.cpp | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Windows/GEDebugger/GEDebugger.cpp b/Windows/GEDebugger/GEDebugger.cpp index 0223283187..726a19d745 100644 --- a/Windows/GEDebugger/GEDebugger.cpp +++ b/Windows/GEDebugger/GEDebugger.cpp @@ -201,9 +201,6 @@ CGEDebugger::CGEDebugger(HINSTANCE _hInstance, HWND _hParent) } CGEDebugger::~CGEDebugger() { - delete frameWindow; - delete texWindow; - delete flags; delete lighting; delete textureState; diff --git a/Windows/GEDebugger/SimpleGLWindow.cpp b/Windows/GEDebugger/SimpleGLWindow.cpp index da9ea70757..ab6f27fe14 100644 --- a/Windows/GEDebugger/SimpleGLWindow.cpp +++ b/Windows/GEDebugger/SimpleGLWindow.cpp @@ -383,6 +383,10 @@ LRESULT CALLBACK SimpleGLWindow::WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPA // Continue with window creation. return win != NULL ? TRUE : FALSE; + case WM_NCDESTROY: + delete win; + return 0; + case WM_LBUTTONDBLCLK: if (win->ToggleZoom()) { return 0;