diff --git a/Windows/Debugger/CtrlMemView.cpp b/Windows/Debugger/CtrlMemView.cpp index 2245bba009..8de363dc6d 100644 --- a/Windows/Debugger/CtrlMemView.cpp +++ b/Windows/Debugger/CtrlMemView.cpp @@ -60,7 +60,8 @@ CtrlMemView::CtrlMemView(HWND _wnd) CtrlMemView::~CtrlMemView() { - DeleteObject(font); + DeleteObject(font); + DeleteObject(underlineFont); } void CtrlMemView::init() diff --git a/Windows/Debugger/Debugger_Disasm.cpp b/Windows/Debugger/Debugger_Disasm.cpp index 20fa90c0ab..99b9115689 100644 --- a/Windows/Debugger/Debugger_Disasm.cpp +++ b/Windows/Debugger/Debugger_Disasm.cpp @@ -171,7 +171,7 @@ CDisasm::CDisasm(HINSTANCE _hInstance, HWND _hParent, DebugInterface *_cpu) : Di bottomTabs->ShowTab(memHandle); // init status bar - statusBarWnd = CreateStatusWindow(WS_CHILD | WS_VISIBLE, L"", m_hDlg, IDC_DISASMSTATUSBAR); + statusBarWnd = CreateWindowEx(0, STATUSCLASSNAME, L"", WS_CHILD | WS_VISIBLE, 0, 0, 0, 0, m_hDlg, (HMENU)IDC_DISASMSTATUSBAR, _hInstance, NULL); if (g_Config.bDisplayStatusBar == false) { ShowWindow(statusBarWnd,SW_HIDE); @@ -187,6 +187,14 @@ CDisasm::CDisasm(HINSTANCE _hInstance, HWND _hParent, DebugInterface *_cpu) : Di CDisasm::~CDisasm() { + DestroyWindow(statusBarWnd); + + delete leftTabs; + delete bottomTabs; + delete breakpointList; + delete threadList; + delete stackTraceView; + delete moduleList; } void CDisasm::stepInto() diff --git a/Windows/GEDebugger/CtrlDisplayListView.cpp b/Windows/GEDebugger/CtrlDisplayListView.cpp index f6ffd2cc2d..e1db230231 100644 --- a/Windows/GEDebugger/CtrlDisplayListView.cpp +++ b/Windows/GEDebugger/CtrlDisplayListView.cpp @@ -78,6 +78,9 @@ LRESULT CALLBACK CtrlDisplayListView::wndProc(HWND hwnd, UINT msg, WPARAM wParam // Continue with window creation. return win != NULL; + case WM_NCDESTROY: + delete win; + break; case WM_SIZE: win->redraw(); break; diff --git a/Windows/GEDebugger/CtrlDisplayListView.h b/Windows/GEDebugger/CtrlDisplayListView.h index 84364f867f..d8e79498a1 100644 --- a/Windows/GEDebugger/CtrlDisplayListView.h +++ b/Windows/GEDebugger/CtrlDisplayListView.h @@ -39,6 +39,10 @@ public: static LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); static CtrlDisplayListView * getFrom(HWND wnd); + HWND GetHWND() { + return wnd; + } + void onPaint(WPARAM wParam, LPARAM lParam); void onKeyDown(WPARAM wParam, LPARAM lParam); void onMouseDown(WPARAM wParam, LPARAM lParam, int button); diff --git a/Windows/GEDebugger/GEDebugger.cpp b/Windows/GEDebugger/GEDebugger.cpp index 6ca5777939..0c6d31b882 100644 --- a/Windows/GEDebugger/GEDebugger.cpp +++ b/Windows/GEDebugger/GEDebugger.cpp @@ -123,6 +123,7 @@ CGEDebugger::CGEDebugger(HINSTANCE _hInstance, HWND _hParent) } CGEDebugger::~CGEDebugger() { + DestroyWindow(displayList->GetHWND()); CleanupPrimPreview(); delete flags; delete lighting; diff --git a/Windows/W32Util/ShellUtil.cpp b/Windows/W32Util/ShellUtil.cpp index bde4d9c216..5ee34c9d57 100644 --- a/Windows/W32Util/ShellUtil.cpp +++ b/Windows/W32Util/ShellUtil.cpp @@ -138,6 +138,10 @@ namespace W32Util thread_->detach(); } + AsyncBrowseDialog::~AsyncBrowseDialog() { + delete thread_; + } + bool AsyncBrowseDialog::GetResult(std::string &filename) { filename = filename_; return result_; diff --git a/Windows/W32Util/ShellUtil.h b/Windows/W32Util/ShellUtil.h index ba7899fc1e..8dcf91d3b3 100644 --- a/Windows/W32Util/ShellUtil.h +++ b/Windows/W32Util/ShellUtil.h @@ -28,6 +28,8 @@ namespace W32Util // For a file (OPEN or SAVE.) AsyncBrowseDialog(Type type, HWND parent, UINT completeMsg, std::wstring title, std::wstring initialFolder, std::wstring filter, std::wstring extension); + ~AsyncBrowseDialog(); + bool GetResult(std::string &filename); Type GetType() { return type_;