1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-08 20:52:09 +01:00

Use macro safenew for many allocations of wxWindow subclasses

This commit is contained in:
Paul Licameli
2016-02-13 18:06:49 -05:00
parent 6052b5f9be
commit 3f237daddc
42 changed files with 238 additions and 214 deletions

View File

@@ -93,7 +93,7 @@ void DeviceToolBar::Populate()
{
DeinitChildren();
// Hosts
mHost = new wxChoice(this,
mHost = safenew wxChoice(this,
wxID_ANY,
wxDefaultPosition,
wxDefaultSize);
@@ -104,17 +104,17 @@ void DeviceToolBar::Populate()
if( mRecordBitmap == NULL )
mRecordBitmap = new wxBitmap(theTheme.Bitmap(bmpMic));
Add(new wxStaticBitmap(this,
Add(safenew wxStaticBitmap(this,
wxID_ANY,
*mRecordBitmap), 0, wxALIGN_CENTER);
mInput = new wxChoice(this,
mInput = safenew wxChoice(this,
wxID_ANY,
wxDefaultPosition,
wxDefaultSize);
Add(mInput, 0, wxALIGN_CENTER);
mInputChannels = new wxChoice(this,
mInputChannels = safenew wxChoice(this,
wxID_ANY,
wxDefaultPosition,
wxDefaultSize);
@@ -123,11 +123,11 @@ void DeviceToolBar::Populate()
// Output device
if( mPlayBitmap == NULL )
mPlayBitmap = new wxBitmap(theTheme.Bitmap(bmpSpeaker));
Add(new wxStaticBitmap(this,
Add(safenew wxStaticBitmap(this,
wxID_ANY,
*mPlayBitmap), 0, wxALIGN_CENTER);
mOutput = new wxChoice(this,
mOutput = safenew wxChoice(this,
wxID_ANY,
wxDefaultPosition,
wxDefaultSize);