View Single Post
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 07-19-2018 , 03:17   Re: [Any] Delay Command (testing appreciated!)
Reply With Quote #11

Quote:
Originally Posted by Mitchell View Post
then why are you using CloseHandle() (old syntax) instead of delete and also I think you need to use KillTimer() not just close the handle.
https://sm.alliedmods.net/new-api/timers/KillTimer
It also has an auto close for the data handle, just briefly looking it may close those datapacks you're also not closing but storing in the ArrayList (this is just how it appears, i'm not familiar with looping through the indices of an ArrayList).
delete is just CloseHandle() with the added bonus of setting the passed variable to null by-reference. In this case, delete is incorrect, because you're totally right: I'm leaking DataPacks by not instead using KillTimer(hTimer, true) in OnClientDisconnect(). This still doesn't explain the error log, though.
__________________

Last edited by ddhoward; 07-19-2018 at 03:40.
ddhoward is offline