106
Technical forum / Unload variables from memory
« on: July 09, 2007, 11:46:03 AM »
I know that if I want that two scripts are using the same variable, this variable must be global. But in case that these scripts are used only one time in the game, what can I unload from memory the variable?
I need know that because along the game a lot of variables are declared but only are used in one scene or one time. These variables are taking memory from computer (specially if some of they are arrays) and if the game is long this may be a serious problem. Also when player save the game into savegame file, is possible that it spends a lot of time to save a lot of little variables that a lot of them aren't necessary because never will be used yet.
I need know that because along the game a lot of variables are declared but only are used in one scene or one time. These variables are taking memory from computer (specially if some of they are arrays) and if the game is long this may be a serious problem. Also when player save the game into savegame file, is possible that it spends a lot of time to save a lot of little variables that a lot of them aren't necessary because never will be used yet.