From 2d07efd1dd48a1e33399f036e4b0b952c890d1ff Mon Sep 17 00:00:00 2001 From: Hyunin Song Date: Sun, 15 Oct 2017 22:38:37 +0900 Subject: [PATCH] Replace NotePlayHandle::done() to the actual destructor --- include/NotePlayHandle.h | 3 +-- src/core/NotePlayHandle.cpp | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/NotePlayHandle.h b/include/NotePlayHandle.h index 344980eb61e..768a74aa276 100644 --- a/include/NotePlayHandle.h +++ b/include/NotePlayHandle.h @@ -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 ) { diff --git a/src/core/NotePlayHandle.cpp b/src/core/NotePlayHandle.cpp index 84d888fee6b..11f71d8f19b 100644 --- a/src/core/NotePlayHandle.cpp +++ b/src/core/NotePlayHandle.cpp @@ -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();