Unreachable Object Website Links For
Memory
 

Information About

Unreachable Object




In dynamic memory allocation implementations that employ a Garbage Collector , objects are reclaimed after they become unreachable. The garbage collector is able to determine if an object is reachable; any object that is determined to no longer be reachable can be deallocated. Many Programming Language s (for example, Java , C# , D , Dylan ) use automatic garbage collection.

In contrast, when memory becomes unreachable in dynamic memory allocation implementations that require explicit deallocation, the memory can no longer be explicitly deallocated. Unreachable memory in systems that use manual memory management results in a Memory Leak .

Some garbage collectors implement Weak Reference s. If an object is reachable only through either weak references or chains of references that include a weak reference, then the object is said to be weakly reachable. The garbage collector can treat a weakly reachable Object Graph as unreachable and deallocate it. (Conversely, references that prevent an object from being garbage collected are called ''strong references''; a weakly reachable object is unreachable by any chain consisting only of strong references.) Some garbage-collected Object-oriented languages, such as Java and Python , feature weak references. The Java Package Java.lang.ref supports soft, weak and phantom references, resulting in the additional object reachability states '''softly reachable''' and '''phantom reachable'''.


SEE ALSO