I used DialogBlocks to render code for a dialog box and in the CreateControls method it builds there are a lot of references to wxBoxSizer and other related Static fields that have the following code
Code: Select all
wxBoxSizer *BoxSizer1 = new wxBoxSizer(...); //the ellipse is just to show a parameter exists but is not important.
My question is, I cannot call delete BoxSizer1 at the end of this method or I will crash the application? Does wxWidgets handle the deletion of BoxSizer1? I don't see how but maybe I'm missing something.
I realize the quickest solution here is just put the wxBoxSizer *BoxSizer1 in the class Object created rather than have it local to the method but if wxWidgets does handle this somehow it does save the work.
Thanks!