1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-25 07:43:54 +02:00

Sizers are owned by wxWindow objects when added, so use safenew, or...

... use unique_ptr in the interim between building them and adding.

This checks eliminates some naked news, which were not paired with deletes.
This commit is contained in:
Paul Licameli
2016-02-18 14:53:43 -05:00
parent c7d3ff7299
commit 1c07741d57
26 changed files with 1338 additions and 1233 deletions

View File

@@ -267,7 +267,7 @@ public:
int GetId() {return miIdNext;};
void UseUpId();
wxSizer * GetSizer() {return mpSizer;};
wxSizer * GetSizer() {return mpSizer;}
protected:
void SetProportions( int Default );
@@ -313,7 +313,7 @@ protected:
// Proportion set by user rather than default.
int miPropSetByUser;
wxSizer * mpSubSizer;
std::unique_ptr<wxSizer> mpSubSizer;
wxSizer * mpSizer;
wxWindow * mpParent;
wxWindow * mpWind;
@@ -358,7 +358,7 @@ enum
eCloseID = wxID_CANCEL
};
AUDACITY_DLL_API wxSizer *CreateStdButtonSizer( wxWindow *parent,
AUDACITY_DLL_API std::unique_ptr<wxSizer> CreateStdButtonSizer( wxWindow *parent,
long buttons = eOkButton | eCancelButton,
wxWindow *extra = NULL );