Menu

#2604 Detach menus before destroying

Trunk
closed-accepted
GUI (476)
5
2008-06-29
2008-06-27
Kimmo Varis
No

I found this bug while investigating bug:
#1976241 the winmerge.exe process doesn't stop itself
http://winmerge.org/bug/1976241

Currently we just delete pointers to three different menus in CMainFrame destructor. I also added explicit DestroyMenu() calls even though BCMenu destructor seems to call it. But this way it is very clear we properly delete menus.

I found this after I read Gal's comment on another related (to the exit hang) bug item that he thinks the menu doesn't get destroyed and still handles messages. I started to wonder how come they aren't deleted even though pointers are deleted...

Discussion

  • Kimmo Varis

    Kimmo Varis - 2008-06-27

    The patch.

     
  • Kimmo Varis

    Kimmo Varis - 2008-06-29
    • milestone: --> Trunk
    • assigned_to: nobody --> kimmov
    • status: open --> closed-accepted
     
  • Kimmo Varis

    Kimmo Varis - 2008-06-29

    Logged In: YES
    user_id=631874
    Originator: YES

    Gordon reported this patch didn't help for the shutdown problem.

    But it still worthwhile patch to have in trunk. I removed the calls to DestroyMenu() as BCMenu destructor calls it.

    Committed to SVN trunk:
    Completed: At revision: 5539

     

Log in to post a comment.