Stack, Heap and Garbage Collection
Java memory: the stack and the heap, what keeps an object alive for the garbage collector, the two memory errors, and leaks.
Where a running Java program keeps its values and how the garbage collector, the part of the JVM that frees memory automatically, decides what to remove. You never free memory yourself in Java, which is why it is worth twenty minutes: the two memory errors only make sense if you know which region ran out. It covers the stack and the heap, reachability, StackOverflowError against OutOfMemoryError, System.gc(), and leaks. It leaves out collector algorithms, tuning flags and generations.
Contents
9 cardsnot started