Cardozz 46 Posted July 26, 2015 Hello there, I recently updated one of my scripts with some antiban features. Now when I compare it with one older backup file, the memory it's using is ridiculously jumping from 100 MB to 380 MB in no time, and then resets. It does this everytime a condition is met or a method is completed. It feels like this jump of about 300 - 400 MB memory usage is lagging the client a little bit, which then makes the script a bit less flawless. I wonder what can cause this memory jump, since I tried the exact same script version without the anti-ban feature in it whereas it still has these jumps (I can't seem to find the flaw). Thanks in advance!
Pandemic 2842 Posted July 26, 2015 The easiest way to find out what's wrong (without profiling) would be just to comment out parts of your script until you find what's using all the memory.
Cardozz 46 Author Posted July 26, 2015 Yee that's what I did lol, ill try again and see what I can find. EDIT: Ok I found out what the problem was. It was a GameObject variable I created earlier in the method, but like far off where it's been used. That's what caused the memory to freak out as it has to re-allocate the gameobject for the correct condition.
Polish Civil 90 Posted July 26, 2015 More memory - less cpu usage, basic rule for the bots basically.Unless you have memory leak
Recommended Posts
Archived
This topic is now archived and is closed to further replies.