static
#4

Neither (or rather negligible?), static stays in memory for further usage, while everytime you leave the code block a variable belongs to, a 'new' variable gets removed from memory, therefore re-allocating that space every time you call it.
Statics are mostly used when the code is under a heavily repetitive callback, so it won't remove and recreate the var 20 times a sec for example.

As a rule of thumb, if you don't know why static is useful here, just don't use it, use new everywhere!
Reply


Messages In This Thread
static - by Micko123 - 27.08.2016, 09:18
Re: static - by IFilip - 27.08.2016, 10:38
Re: static - by DeeadPool - 27.08.2016, 11:01
Re: static - by PrO.GameR - 27.08.2016, 12:15
Re: static - by Micko123 - 27.08.2016, 15:01
Re: static - by SickAttack - 27.08.2016, 17:18

Forum Jump:


Users browsing this thread: 1 Guest(s)