View Single Post
Visual77
Veteran Member
Join Date: Jan 2009
Old 03-04-2018 , 18:05   Re: New API and Syntax
Reply With Quote #918

Quote:
Originally Posted by asherkin View Post
delete is preferred, all 3 are valid (Handle.Close is a built-in on the Handle methodmap).
Sorry for the double post but I have a memory leakage problem here. A repeated timer (5.0 sec) runs a loop on all connected players and creates 62 datapacks together with 62 QueryClientConvars. One datapack is sent to each QueryClientConVar, where it's read and destroyed. 20 players means a maximum possibility of 1240 datapacks being read and immediately destroyed. I've done it like I showed you in the code above.

At the first 10-15 minutes of plugin load, there is no memory leakage. Everything works as expected on a full server. sm_dump_handles handles.txt shows a slight increase in datapacks during the loop request and when doing the dump request again, those handles have freed themselves.

However, after letting the plugin run for some time, sm_dump_handle reports as to having 3100 open datapacks which must be a memory leakage. And when I keep refreshing the handle dump, it's either still 3100 or higher than 3100. It doesn't make sense to me.

Search "l4d2_clienthack_dete DataPack" (3100 hits in 1 file)
C:\Desktop\handles.txt (3100 hits)
Line 43: 0x3a4c0059 l4d2_clienthack_dete DataPack 84
Line 44: 0x1e09005a l4d2_clienthack_dete DataPack 84
Line 263: 0x1a180180 l4d2_clienthack_dete DataPack 84

Last edited by Visual77; 03-04-2018 at 18:17.
Visual77 is offline