Garbage Collection
Garbage collection is an automatic memory management process that identifies and reclaims memory occupied by objects that a program can no longer reach or use, freeing developers from manually deallocating memory.
10 resources across 2 libraries
Glossary Terms(3)
Garbage Collection
Garbage collection is an automatic memory management process that identifies and reclaims memory occupied by objects that a program can no longer reach or use,…
Memory Leak
A memory leak is a defect in which a program allocates memory during execution but fails to release it after it is no longer needed, causing available memory t…
Pointer
A pointer is a variable that stores a memory address rather than a value directly, allowing a program to reference and manipulate data indirectly through that…
Interview Questions(7)
What is a Finalizer in OOP?
A finalizer is a method a garbage-collected runtime may call on an object before reclaiming its memory, intended as a last-resort cleanup hook, but its executi…
What is an Inner Class in OOP?
An inner class is a non-static nested class that holds an implicit reference to an instance of its enclosing class, giving it direct access to that instance’s…
How Does Garbage Collection Relate to OOP?
Garbage collection is an automatic memory-management strategy that reclaims heap memory occupied by objects once a language’s runtime determines no live refere…
RAII vs Garbage Collection
RAII (Resource Acquisition Is Initialization) ties a resource’s lifetime deterministically to an object’s scope so it is released the instant that object is de…
What is Memory Compaction?
Memory compaction is the process of relocating allocated memory blocks so that they sit contiguously, merging the scattered free holes left between them into o…
What is a Log-Structured File System?
A log-structured file system treats the entire disk as a single sequential append-only log, buffering all writes — data and metadata alike — into large segment…
WeakMap vs WeakSet: What Is the Difference?
A WeakMap stores key-value pairs where the keys must be objects held only weakly, so entries are automatically garbage-collected once nothing else references t…