Merge pull request #3884 from PhysSong/nphdestruct

Fix missing destructor call in NotePlayHandle
This commit is contained in:
Lukas W
2017-10-16 09:23:31 +02:00
committed by GitHub
2 changed files with 3 additions and 4 deletions

View File

@@ -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 )
{

View File

@@ -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();