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:
@@ -254,7 +254,7 @@ class WXDLLEXPORT wxDataObjectComposite : public wxDataObject
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// ctor
|
// ctor
|
||||||
wxDataObjectComposite() { m_preferred = 0; }
|
wxDataObjectComposite();
|
||||||
|
|
||||||
// add data object (it will be deleted by wxDataObjectComposite, hence it
|
// add data object (it will be deleted by wxDataObjectComposite, hence it
|
||||||
// must be allocated on the heap) whose format will become the preferred
|
// must be allocated on the heap) whose format will become the preferred
|
||||||
|
@@ -94,6 +94,13 @@ bool wxDataObjectBase::IsSupported(const wxDataFormat& format,
|
|||||||
// wxDataObjectComposite
|
// wxDataObjectComposite
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
wxDataObjectComposite::wxDataObjectComposite()
|
||||||
|
{
|
||||||
|
m_preferred = 0;
|
||||||
|
|
||||||
|
m_dataObjects.DeleteContents(TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
wxDataObjectSimple *
|
wxDataObjectSimple *
|
||||||
wxDataObjectComposite::GetObject(const wxDataFormat& format) const
|
wxDataObjectComposite::GetObject(const wxDataFormat& format) const
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user