Unreachable memory
In computer science, unreachable memory is a block of memory allocated dynamically where the program that allocated the memory no longer has any reachable pointer that refers to it. Similarly, an unreachable object is a dynamically allocated object that has no reachable reference to it. Informally, unreachable memory is dynamic memory that the program can not reach directly, nor get to by starting at an object it can reach directly, and then following a chain of pointer references.

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 languages (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 references. 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 . 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 codice_1 supports soft, weak and phantom references, resulting in the additional object reachability states softly reachable and phantom reachable.

Unreachable memory is often associated with software aging.
Q21198
computer science
Concept
Q2308807
memory
Concept
Q2308807
allocated dynamically
Concept
Q40056
program
Concept
Q118155
pointer
Concept
Q216601
object
Concept
Q1334113
reference
Concept
Q322202
garbage collector
Concept
Q9143
programming language
Concept
Q251
Java
Concept
Q2370
C#
MEDIA
Q319268
D
MEDIA
Q1268744
Dylan
MEDIA
Q2308807
deallocated
Concept
Q751740
memory leak
Concept
Q2032747
weak reference
Concept
Q7075052
object graph
UNK
Q79872
object-oriented
Concept
Q251
Java
Concept
Q28865
Python
MEDIA
Q2529678
Java package
UNK
Q7554236
software aging
Concept
Q6771358
Unreachable memory
UNK
Q6771358
Unreachable memory
UNK
+1^^http://www.w3.org/2001/XMLSchema#decimal
1
NUMBER
instance of
instance of
instance of
instance of
programming paradigm