Delete SimpleGLWindow near where it's new'd.

This makes it clearer and more foolproof.
This commit is contained in:
Unknown W. Brackets 2013-10-06 12:49:39 -07:00
parent 83548041e2
commit d5513c3b58
2 changed files with 4 additions and 3 deletions

View file

@ -201,9 +201,6 @@ CGEDebugger::CGEDebugger(HINSTANCE _hInstance, HWND _hParent)
}
CGEDebugger::~CGEDebugger() {
delete frameWindow;
delete texWindow;
delete flags;
delete lighting;
delete textureState;

View file

@ -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;