12-28-2008, 08:06 AM
Edit:
@Charlie: The idea is that global variables don't disappear after introduced so they keep using memory where as local variables are disposed and therefore the number of variables would generally be lower.
For the scope of an RPG Maker XP or VX game I really believe the difference to be insignificant. Maybe it's only for 99 % though.[/quote]
Wait, I wrote the same thing.
@Charlie: The idea is that global variables don't disappear after introduced so they keep using memory where as local variables are disposed and therefore the number of variables would generally be lower.
For the scope of an RPG Maker XP or VX game I really believe the difference to be insignificant. Maybe it's only for 99 % though.[/quote]
Wait, I wrote the same thing.
Quote:Only local variables get removed at the end of the method in which they were defined.I was comparing the use of a brand new global $foo, with the use of $temp.foo, where foo is an accessor of class Game_Temp. Both will not be freed until the program ends, unless you force them to be freed of course.