1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-25 14:11:28 +01:00

Consistently use delete[] not free for NoteTrack serialization...

... Because allocation is with new[], if you search for where it happens in
lib-src.
This commit is contained in:
Paul Licameli
2017-03-03 13:26:35 -05:00
parent 7dbb946d29
commit 509f974dfb
3 changed files with 8 additions and 12 deletions

View File

@@ -198,7 +198,7 @@ class AUDACITY_DLL_API NoteTrack final : public Track {
// mSeq variable. (TrackArtist should check to make sure this
// flip-flop from mSeq to mSerializationBuffer happened an
// even number of times, otherwise mSeq will be NULL).
mutable char *mSerializationBuffer; // NULL means no buffer
mutable std::unique_ptr<char[]> mSerializationBuffer; // NULL means no buffer
long mSerializationLength;
#ifdef EXPERIMENTAL_MIDI_OUT