If a shape has client data, it deletes it when the shape is deleted.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11708 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
5bf2abe348
commit
c8bc33d5b5
@ -338,6 +338,11 @@ wxShape::~wxShape()
|
||||
if (m_canvas)
|
||||
m_canvas->RemoveShape(this);
|
||||
|
||||
if (m_clientData) {
|
||||
delete m_clientData;
|
||||
m_clientData = NULL;
|
||||
}
|
||||
|
||||
GetEventHandler()->OnDelete();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user