Correct wxObjectDataPtr<> assignment from *T to not increase the ref count
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51076 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -168,6 +168,11 @@ public:
|
||||
wxT("German Requiem"), wxT("Johannes Brahms"), 1868 ) );
|
||||
m_classicalMusicIsKnownToControl = false;
|
||||
}
|
||||
|
||||
~MyMusicModel()
|
||||
{
|
||||
delete m_root;
|
||||
}
|
||||
|
||||
// helper method for wxLog
|
||||
|
||||
@@ -575,6 +580,7 @@ class MyFrame : public wxFrame
|
||||
{
|
||||
public:
|
||||
MyFrame(wxFrame *frame, const wxString &title, int x, int y, int w, int h);
|
||||
~MyFrame();
|
||||
|
||||
public:
|
||||
void OnQuit(wxCommandEvent& event);
|
||||
@@ -832,7 +838,7 @@ MyFrame::MyFrame(wxFrame *frame, const wxString &title, int x, int y, int w, int
|
||||
child = treectrl2->AppendItem( parent,wxT("Child 1"), 0 );
|
||||
child = treectrl2->AppendItem( parent,wxT("Child 2"), 0 );
|
||||
child = treectrl2->AppendItem( parent,wxT("Child 3"), 0 );
|
||||
|
||||
|
||||
bottom_sizer->Add( treectrl2 );
|
||||
|
||||
// main sizer
|
||||
@@ -842,6 +848,11 @@ MyFrame::MyFrame(wxFrame *frame, const wxString &title, int x, int y, int w, int
|
||||
SetSizer( main_sizer );
|
||||
}
|
||||
|
||||
MyFrame::~MyFrame()
|
||||
{
|
||||
delete wxLog::SetActiveTarget(m_logOld);
|
||||
}
|
||||
|
||||
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event) )
|
||||
{
|
||||
Close(true);
|
||||
|
Reference in New Issue
Block a user