4)
Code:
if (action == MenuAction_End)
{
/* This is called after VoteEnd */
CloseHandle(menu);
}
(In the handler callback) is the magic block of code. Every menu that disappears from the client's screen (or is replaced by another) calls the handler with 'action' set to MenuAction_End.
So this is the only spot you need to put a CloseHandle();
Closing the handle while in use can cause instability.
__________________