Raised This Month: $51 Target: $400
 12% 

[Any] Delay Command (testing appreciated!)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 07-19-2018 , 03:17   Re: [Any] Delay Command (testing appreciated!)
Reply With Quote #8

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
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:12.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode