View Single Post
10-07-15, 10:21 PM   #4
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,196
Variables are nothing more than names you use to refer to values. You're not allocating extra memory when declaring them, or even when switching them to hold a completely different value. There is a temporary and negligible allocation under the hood, of course, just as a pointer in C, C++, or equivalent languages has, but it's done on the stack and is thus freed when the variable leaves scope.

You shouldn't be stingy about using variables, since their entire existence is designed to facilitate the flow of logic and readability of your code.
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of NPCScan and many other AddOns.

Last edited by Torhal : 10-07-15 at 10:28 PM.
  Reply With Quote