diff --git a/include/NotePlayHandle.h b/include/NotePlayHandle.h index e17a5e3a2..71866d13b 100644 --- a/include/NotePlayHandle.h +++ b/include/NotePlayHandle.h @@ -349,6 +349,7 @@ public: NotePlayHandle::Origin origin = NotePlayHandle::OriginPattern ); static void release( NotePlayHandle * nph ); static void extend( int i ); + static void free(); private: static NotePlayHandle ** s_available; diff --git a/src/core/NotePlayHandle.cpp b/src/core/NotePlayHandle.cpp index c101e4edf..d540792c0 100644 --- a/src/core/NotePlayHandle.cpp +++ b/src/core/NotePlayHandle.cpp @@ -623,3 +623,8 @@ void NotePlayHandleManager::extend( int c ) ++n; } } + +void NotePlayHandleManager::free() +{ + MM_FREE(s_available); +} diff --git a/src/core/main.cpp b/src/core/main.cpp index 29be5ff67..36fe58757 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -1009,5 +1009,8 @@ int main( int argc, char * * argv ) } #endif + + NotePlayHandleManager::free(); + return ret; }