Code::Blocks

User forums => Using Code::Blocks => Topic started by: spflanze on September 13, 2017, 11:45:43 pm

Title: Memory Leak?
Post by: spflanze on September 13, 2017, 11:45:43 pm
I followed this tutorial to its end:
http://wiki.codeblocks.org/index.php/WxSmith_tutorial:_Working_with_multiple_resources

At the bottom of this tutorial there are instructions to add this code:

Code: [Select]
void Tutorial_4Frame::OnButton2Click(wxCommandEvent& event)
{
    FirstDialog* dlg = new FirstDialog(this);
    dlg->Show();
}

void Tutorial_4Frame::OnButton3Click(wxCommandEvent& event)
{
    FirstFrame* frm = new FirstFrame(this);
    frm->Show();
}

I cannot find where in the code the dlg and frm objects are deleted. Does this project created according to this tutorial's instructions leak memory?
Title: Re: Memory Leak?
Post by: ollydbg on September 14, 2017, 12:49:47 am
c++ - Why wxWidgets never calls delete after calling new? - Stack Overflow (https://stackoverflow.com/questions/20898603/why-wxwidgets-never-calls-delete-after-calling-new)