Difference between revisions of "Memory Leak"

From AlliedModders Wiki
Jump to: navigation, search
(Created page with "A '''memory leak''' occurs when memory is allocated to a process, and is not freed. This results in memory being taken up by objects that are no longer in use. Eventually, the...")
 
 
Line 4: Line 4:
  
 
SourceMod features a system to automatically reload plugins that it detects are leaking memory.
 
SourceMod features a system to automatically reload plugins that it detects are leaking memory.
 +
 +
See also: [http://en.wikipedia.org/wiki/Memory_leak Memory leak (Wikipedia)]

Latest revision as of 11:12, 21 June 2012

A memory leak occurs when memory is allocated to a process, and is not freed. This results in memory being taken up by objects that are no longer in use. Eventually, the system will run out of memory and crash.

To prevent memory leaks in SourcePawn, one must always close Handles. Note that there are some types of Handles that cannot or shouldn't be closed. This will be noted in the documentation of the function used to open/get them.

SourceMod features a system to automatically reload plugins that it detects are leaking memory.

See also: Memory leak (Wikipedia)