1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-09-24 16:01:16 +02:00

more safenew

This commit is contained in:
Paul Licameli 2017-02-23 11:11:31 -05:00
parent 9119d703ce
commit ec0297ec28
2 changed files with 8 additions and 2 deletions

View File

@ -21,7 +21,9 @@
**********************************************************************/
#include "../../Audacity.h"
#include "VSTControl.h"
#include "../../MemoryX.h"
@interface VSTView : NSView
{
@ -90,7 +92,8 @@ bool VSTControl::Create(wxWindow *parent, VSTEffectLink *link)
[mVSTView init];
[mVSTView retain];
SetPeer(new VSTControlImpl(this, mVSTView));
// wxWidgets takes ownership so safenew
SetPeer(safenew VSTControlImpl(this, mVSTView));
CreateCocoa();

View File

@ -21,6 +21,7 @@
**********************************************************************/
#include "../../Audacity.h"
#include <AudioUnit/AudioUnit.h>
#include <AudioUnit/AudioComponent.h>
#include <AudioUnit/AudioUnitProperties.h>
@ -32,6 +33,7 @@
#endif
#include "AUControl.h"
#include "../../MemoryX.h"
@interface AUView : NSView
{
@ -173,7 +175,8 @@ bool AUControl::Create(wxWindow *parent, AudioComponent comp, AudioUnit unit, bo
return false;
}
SetPeer(new AUControlImpl(this, mAUView));
// wxWidgets takes ownership so safenew
SetPeer(safenew AUControlImpl(this, mAUView));
if (mHIView)
{