import-bot (20212) [Avatar] Offline
[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

As first line of CMaxMidiOut::Attach, insert:
Detach(pTrack); // detach if currently attached

In CMaxMidiOut:smilieetach, around line 183, after the GlobalReAlloc, insert:

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;
CMaxMidiTrack::pMidiOut = NULL; // evidence for naming members m_*?