import-bot (20212) [Avatar] Offline
#1
[Originally posted by spike]

Here are a couple of small changes I made to the MaxMIDI code, they apply to
either 1.57 or 1.58. Paul & co., I hope you agree that these are
improvements.

[cmaxmidiout.cpp]
As first line of CMaxMidiOut::Attach, insert:
Detach(pTrack); // detach if currently attached

In CMaxMidiOut:smilieetach, around line 183, after the GlobalReAlloc, insert:
pTrack->Detach(this);

[cmaxmiditrack.cpp]
In the destructor ~CMaxMidiTrack, after the call to FreeBuffer, insert:
if (lpName) ::GlobalFree(lpName); // don't leak...

And in CMaxMidiTrack:smilieetach(CMaxMidiOut* pMidiOut), replace:
pMidiOut = NULL;
with:
CMaxMidiTrack::pMidiOut = NULL; // evidence for naming members m_*?