another memory leak fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -96,7 +96,7 @@ wxCursorRefData::wxCursorRefData()
|
|||||||
m_width = 32;
|
m_width = 32;
|
||||||
m_height = 32;
|
m_height = 32;
|
||||||
|
|
||||||
m_destroyCursor = FALSE;
|
refData->m_destroyCursor = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxCursorRefData::Free()
|
void wxCursorRefData::Free()
|
||||||
@@ -145,7 +145,6 @@ wxCursor::wxCursor(const wxString& cursor_file,
|
|||||||
#else
|
#else
|
||||||
refData->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), cursor_file);
|
refData->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), cursor_file);
|
||||||
#endif
|
#endif
|
||||||
refData->m_destroyCursor = FALSE;
|
|
||||||
}
|
}
|
||||||
else if (flags == wxBITMAP_TYPE_CUR)
|
else if (flags == wxBITMAP_TYPE_CUR)
|
||||||
{
|
{
|
||||||
@@ -317,6 +316,9 @@ wxCursor::wxCursor(int cursor_type)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// no need to destroy the stock cursors
|
||||||
|
refData->m_destroyCursor = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxCursor::~wxCursor()
|
wxCursor::~wxCursor()
|
||||||
|
Reference in New Issue
Block a user