Fix memory leak that the rpmalloc assert warns of (#5776) (Fixes #5733)

Hack to take care of the assertion sent by the rpmalloc memory manager. Creates a static "free" function for NotePlayHandleManager and then shoves it right before the program ends.

Co-authored-by: Pause for Affliction <47124830+Epsilon-13@users.noreply.github.com>
This commit is contained in:
Pause for Affliction
2020-11-10 04:40:53 -07:00
committed by GitHub
parent 437172a542
commit e1d1878108
3 changed files with 9 additions and 0 deletions

View File

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

View File

@@ -623,3 +623,8 @@ void NotePlayHandleManager::extend( int c )
++n;
}
}
void NotePlayHandleManager::free()
{
MM_FREE(s_available);
}

View File

@@ -1009,5 +1009,8 @@ int main( int argc, char * * argv )
}
#endif
NotePlayHandleManager::free();
return ret;
}