Difference between revisions of "Garbage collection (computer science)"

From Conservapedia
Jump to navigation Jump to search
Line 1: Line 1:
 
In [[computer science]], '''garbage collection''' is the process in which memory that was dynamically allocated during the execution of a program is reclaimed after its execution. <ref> {{cite web|url=http://dictionary.reference.com/browse/garbage+collection?jss=0 | title=Garbage collection }} </ref>
 
In [[computer science]], '''garbage collection''' is the process in which memory that was dynamically allocated during the execution of a program is reclaimed after its execution. <ref> {{cite web|url=http://dictionary.reference.com/browse/garbage+collection?jss=0 | title=Garbage collection }} </ref>
 +
 +
== Pointer Management ==
 +
When an [[object]] is created [[memory]] is allocated for it and a pointer is created which refers to where this memory exists. A program counts each time the program requires this object as it might be [[reference|referenced]] in many parts of the program. When no parts of the program are aware of the object both its reference and the memory given to it are cleared, making way for more objects to be created.
  
 
[[Category:Computers]]
 
[[Category:Computers]]

Revision as of 05:28, March 24, 2010

In computer science, garbage collection is the process in which memory that was dynamically allocated during the execution of a program is reclaimed after its execution. [1]

Pointer Management

When an object is created memory is allocated for it and a pointer is created which refers to where this memory exists. A program counts each time the program requires this object as it might be referenced in many parts of the program. When no parts of the program are aware of the object both its reference and the memory given to it are cleared, making way for more objects to be created.

References