Fix memory leak in richtext sample.
Destroy the children of wxRichTextFieldTypeCompositeTest when updating it instead of just clearing the list and leaking the objects in it. Closes #14324. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78037 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -127,7 +127,7 @@ public:
|
||||
attr.SetLineSpacing(10);
|
||||
obj->SetAttributes(attr);
|
||||
}
|
||||
obj->GetChildren().Clear();
|
||||
obj->DeleteChildren();
|
||||
wxRichTextParagraph* para = new wxRichTextParagraph;
|
||||
wxRichTextPlainText* text = new wxRichTextPlainText(GetLabel());
|
||||
para->AppendChild(text);
|
||||
|
Reference in New Issue
Block a user