Variable

From Valve Developer Community
Revision as of 11:42, 24 November 2007 by Volt (talk | contribs) (spam revert)

Jump to: navigation, search

A variable is a type of programmatic object that stores data. Many variables are primitives, such as Integers, Reals, and Characters.

Each variable is temporarily stored in the user's RAM. Whenever the program is exited or is crashed the program's variables are cleared from the user's RAM.

Unfortunately problems with variables often cause memory leaks, which lead to the user's RAM filling up quickly, which in turn affects the entire system which must share this. Often times the user's system will become sluggish and the Page file will be called in, to write to instead of RAM (this is stored on the user's hard disk drive.)

It is important to clear any unused variables from memory as to help fight memory leaks.