Also free internal handlers when wxMSW wxStaticBitmap is destroyed.

r76142 fixed the resource leak when wxStaticBitmap image was replaced by
another one but the leak still happened at the end, when the wxStaticBitmap
was destroyed.

Fix it there as well in the same way.

Closes #16068.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76147 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-03-14 19:22:26 +00:00
parent c8a35a6f17
commit 6b296279ba
2 changed files with 21 additions and 9 deletions

View File

@@ -85,6 +85,10 @@ protected:
WXHANDLE m_currentHandle;
private:
// Replace the image at the native control level with the given HBITMAP or
// HICON (which can be 0) and destroy the previous image if necessary.
void MSWReplaceImageHandle(WXLPARAM handle);
DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
wxDECLARE_EVENT_TABLE();
wxDECLARE_NO_COPY_CLASS(wxStaticBitmap);