View Single Post
MAGNAT2645
Senior Member
Join Date: Nov 2015
Location: AlliedMods.net
Old 11-13-2020 , 06:40   Re: Invalid Timer Handle crash
Reply With Quote #4

Quote:
Originally Posted by GsiX View Post
@Bacardi is OnMapEnd() guaranteed to fire every time and safe to CloseHandle() there or should i just do it on OnMapStart()?
If your timer is stored into global variable you should use this example
Code:
public void OnMapEnd() {
	KillTimer( g_hTimer );
	g_hTimer = null;
}
or just
Code:
public void OnMapEnd() {
	delete g_hTimer;
}
__________________
MAGNAT2645 is offline