27.08.2016, 12:15
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!
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!

