Raised This Month: $ Target: $400
 0% 

How to improve this code?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-02-2014 , 11:43   Re: How to improve this code?
Reply With Quote #4

With 1.8.2, It's designed like: at map change the handle system is well freed, but not the actual allocated memory from plugin datas, which will be reused (or extented) if needed. In others words, if you allocate x bytes from plugin A, and this plugin is disabled on next map, you will have x bytes allocated for nothing.

With 1.8.3, the trie natives are no more based on KTrie library but on Hashmap instead, the whole system is different and this time, memory should be freed properly at each map change.

Still, it's a good practice to free always when you can something you have previously allocated.
I would recommend to use always in this context TrieDestroy in plugin_end().
__________________
Arkshine 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 21:17.


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