Merge pull request #3884 from PhysSong/nphdestruct
Fix missing destructor call in NotePlayHandle
This commit is contained in:
@@ -66,8 +66,7 @@ public:
|
||||
NotePlayHandle* parent = NULL,
|
||||
int midiEventChannel = -1,
|
||||
Origin origin = OriginPattern );
|
||||
virtual ~NotePlayHandle() {}
|
||||
void done();
|
||||
virtual ~NotePlayHandle();
|
||||
|
||||
void * operator new ( size_t size, void * p )
|
||||
{
|
||||
|
||||
@@ -128,7 +128,7 @@ NotePlayHandle::NotePlayHandle( InstrumentTrack* instrumentTrack,
|
||||
}
|
||||
|
||||
|
||||
void NotePlayHandle::done()
|
||||
NotePlayHandle::~NotePlayHandle()
|
||||
{
|
||||
lock();
|
||||
noteOff( 0 );
|
||||
@@ -599,7 +599,7 @@ NotePlayHandle * NotePlayHandleManager::acquire( InstrumentTrack* instrumentTrac
|
||||
|
||||
void NotePlayHandleManager::release( NotePlayHandle * nph )
|
||||
{
|
||||
nph->done();
|
||||
nph->NotePlayHandle::~NotePlayHandle();
|
||||
s_mutex.lockForRead();
|
||||
s_available[ s_availableIndex.fetchAndAddOrdered( 1 ) + 1 ] = nph;
|
||||
s_mutex.unlock();
|
||||
|
||||
Reference in New Issue
Block a user