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:
@@ -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 );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user