View Single Post
Greyscale
SourceMod Plugin Approver
Join Date: Dec 2007
Location: strYoMommasHouse[you];
Old 12-27-2009 , 15:26   Re: My scripting doubts
Reply With Quote #4

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.
__________________
Greyscale is offline