TMenuView doesn't clean up pMenuArray

1604869

Nov 15 1996 12:43AM


TMenuView::IMenuView adds itself to pMenuArray, but doesn't remove itself when it goes away. This can cause a crash if you create a menu view, delete it, and create it again later. What happens is pMenuArray ends up with two entries for the same menu ID. The first one is bad, which is especially unfortunate because that's the one that FindTMenuView returns.
Fix:

Fixed to properly manage array.