Where this was inefficient, they had to store data on disk, and sometimes had alternate portions of program image called overlays . This word is usually used only in connection with automatic memory management . Another possibility is unmapping memory so that the backing store can be allocated to another process. Recycling techniques . In memory management, a reference is the general term for a link from one object to another.
Some programming languages have more specific meanings for the term.
The reference count is incremented for each new reference, and is decremented if a reference is overwritten, or if the referring object is recycled. If a reference count falls to zero, then the object is no longer required and can be recycled. When there is a possibility of cyclic data structures, reference counting is sometimes used together with a tracing garbage collector that runs infrequently. Such combinations are generally less efficient than using a tracing collector by itself, but the promptness of reference counting may be important. Pauses due to reference counting are typically fairly short, and it may be appropriate as a form of incremental garbage collection .