Skip to content

Commit

Permalink
Replace NotePlayHandle::done() to the actual destructor
Browse files Browse the repository at this point in the history
  • Loading branch information
PhysSong committed Oct 16, 2017
1 parent e7e2493 commit 2d07efd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions include/NotePlayHandle.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ class EXPORT NotePlayHandle : public PlayHandle, public Note
NotePlayHandle* parent = NULL,
int midiEventChannel = -1,
Origin origin = OriginPattern );
virtual ~NotePlayHandle() {}
void done();
virtual ~NotePlayHandle();

void * operator new ( size_t size, void * p )
{
Expand Down
4 changes: 2 additions & 2 deletions src/core/NotePlayHandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ NotePlayHandle::NotePlayHandle( InstrumentTrack* instrumentTrack,
}


void NotePlayHandle::done()
NotePlayHandle::~NotePlayHandle()
{
lock();
noteOff( 0 );
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 2d07efd

Please sign in to comment.