Heap
Definition:
A region of memory used for storing objects and class instances, managed by the garbage collector.
Detailed Explanation
- The heap is for dynamic memory allocation.
- Objects stored here can be accessed from anywhere in the program.
- Managed by garbage collection or manual deallocation.
Example
// Object creation uses the heap // var obj = new Object();