View Single Post
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 12-31-2018 , 17:33   Re: pass handle through timer
Reply With Quote #13

Quote:
Originally Posted by Fyren View Post
The CreateEvent docs say not to just close the handle. I didn't look at the implementation to see why, but it may leak memory with the handle being closed.
Both FireEvent / event.Fire and CancelCreatedEvent / event.Cancel will close the event handle when they finish.

In fact, you have to call one of these two methods if you've called CreateEvent or else the event handle will leak. You can't close event handles yourself because they're owned by the SourceMod core and not your plugin.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 12-31-2018 at 17:35.
Powerlord is offline