Dereferencing Objects : Introduction « Object Oriented « JavaScript Tutorial






JavaScript has a garbage collection routine.

When there are no remaining references to an object, the object is said to be dereferenced.

It is possible to forcibly dereference objects by setting all its references equal to null.

var oObject = new Object;

oObject = null;








25.1.Introduction
25.1.1.Declaration and Instantiation
25.1.2.Dereferencing Objects
25.1.3.Native Objects