fixed mem leak in wxDataObjectComposite

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12835 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2001-12-03 00:30:51 +00:00
parent d6044f582c
commit e6b01b78a3
2 changed files with 8 additions and 1 deletions

View File

@ -254,7 +254,7 @@ class WXDLLEXPORT wxDataObjectComposite : public wxDataObject
{
public:
// ctor
wxDataObjectComposite() { m_preferred = 0; }
wxDataObjectComposite();
// add data object (it will be deleted by wxDataObjectComposite, hence it
// must be allocated on the heap) whose format will become the preferred

View File

@ -94,6 +94,13 @@ bool wxDataObjectBase::IsSupported(const wxDataFormat& format,
// wxDataObjectComposite
// ----------------------------------------------------------------------------
wxDataObjectComposite::wxDataObjectComposite()
{
m_preferred = 0;
m_dataObjects.DeleteContents(TRUE);
}
wxDataObjectSimple *
wxDataObjectComposite::GetObject(const wxDataFormat& format) const
{