Replace NotePlayHandle::done() to the actual destructor

This commit is contained in:
Hyunin Song
2017-10-15 22:38:37 +09:00
parent e7e24935b3
commit 2d07efd1dd
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();