SA-MP Forums Archive
DeletePVar question - is it bad? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: DeletePVar question - is it bad? (/showthread.php?tid=222373)



DeletePVar question - is it bad? - _Tommy - 07.02.2011

I would like to know how much memory the function DeletePVar takes each time its beeing called.
I'm working with a lot of temporal player vars while using dialogs. I forgot to delete the player vars each time a player exists his dialog, so I made a global function whitch deletes all the posible pvars that I have ever used in dialogs. I call this function each time a player needs some dialog-pvars to get deleted, but I don't want to check each pvar.

Will that make my server lag or what? I would like to know what would be the results of using my function whitch deletes about 100 player vars each time.


Thank you.


Re: DeletePVar question - is it bad? - _Tommy - 07.02.2011

Well ofcourse I'm gonna fix it, but its a lot of hard work to do. There are a lot of dialogs and right after I realized that I have forgotten to delete the pvars right after I'm done building the code, I have put the new function. Would you mind answering my question since I need to know what are the results of using this instead of deleting each pvar (for now) ?


Re: DeletePVar question - is it bad? - _Tommy - 07.02.2011

Well I don't feel like I need to create alot of temporal variables for just one or two functions, therefore I will edit my code and will delete each created variable. I thought somebody might know what would be the results, but screw it, I will just fix up my code.