Tagged articles
Finalize
13 articles · Page 1 of 1
This article explains how Java's reachability analysis garbage collection handles circular references, contrasts it with reference counting's failure on cycles, details GC roots, three-color marking, finalize() resurrection, and identifies real memory leak patterns caused by lingering root references.
Circular ReferencesFinalizeGC Roots
0 likes · 15 min read

The article explains Java's Object class as the root of all classes, details its fundamental methods such as clone, equals, hashCode, toString, finalize and getClass, illustrates shallow vs. deep copying, shows how to override equals with a Book example, and warns about using finalize for cleanup.
CloneFinalizeJava
0 likes · 10 min read

This article breaks down Java's Object class, detailing its twelve core methods—including equals, hashCode, clone, getClass, notify, notifyAll, and the various wait overloads—providing clear explanations, usage examples, and best‑practice guidelines for developers.
CloneFinalizeJava
0 likes · 4 min read

This article explains the distinct purposes of Java's final keyword, finally block, and finalize method, shows how to use them with classes, methods, and variables, highlights scenarios where finally may not run, discusses finalize deprecation, and recommends modern resource‑management techniques like try‑with‑resources.
Exception HandlingFinalFinalize
0 likes · 5 min read

This article explains why finalize() was deprecated, introduces the Java Cleaner API, compares it with reference types and try‑with‑resources, provides practical code examples, and offers guidelines to use Cleaner effectively while avoiding common pitfalls.
FinalizeJavacleaner
0 likes · 12 min read

This article explains eight typical Java memory‑leak scenarios—including unclosed resources, missing equals/hashCode, non‑static inner classes, overridden finalize, String.intern misuse, ThreadLocal traps, and static variables in web containers—provides code examples for each, and offers practical mitigation strategies.
FinalizeJavaMemory Leak
0 likes · 11 min read

This article investigates the intermittent RejectedExecutionException caused by Executors.newSingleThreadExecutor, explains how Java's garbage collector and finalize method can prematurely shut down thread pools, demonstrates the behavior with reproducible code, and shows how newer JDK versions have fixed the issue.
ConcurrencyFinalizeGarbageCollection
0 likes · 11 min read

This article explains the distinct purposes, usage rules, and underlying bytecode behavior of Java's final, finally, and finalize keywords, covering class and method immutability, variable constancy, guaranteed execution blocks, deprecated finalization, and common performance misconceptions.
FinalFinalizeexception-handling
0 likes · 14 min read

The article anthropomorphizes several JVM internal threads—FinalizerThread, AppClassLoader, ReferenceHandler, and VMThread—detailing how they handle object finalization, class loading, special reference queues, and VM operations, providing a whimsical yet informative overview of JVM internals.
FinalizeJVMThread
0 likes · 7 min read

This article explains the JVM's object liveness determination methods, covering reference counting and reachability analysis, the four Java reference types, and how finalize() can (but should not) rescue objects, illustrated with code examples and memory‑usage results.
FinalizeJVMJava
0 likes · 9 min read

The article examines Android crashes caused by the finalize() method exceeding its watchdog timeout, explains the underlying daemon implementation and typical causes such as long‑running finalizers, lock contention and low‑priority threads, and recommends avoiding finalize, reducing finalizable objects, or suppressing the watchdog exception as practical mitigations.
AndroidFinalizeGC
0 likes · 15 min read

This article explains Java's garbage collection mechanisms, covering memory regions, the limitations of reference counting, the root search algorithm, various reference types, the two-phase marking process, and how the method area is reclaimed, illustrated with code examples and diagrams.
FinalizeJavaReference Types
0 likes · 13 min read

This tutorial explains how Java's automatic garbage collection works, covering the roles of System.gc(), memory regions such as Eden, Survivor and Old generations, reference types, object finalization, and includes code examples that illustrate GC eligibility and OutOfMemoryError scenarios.
FinalizeOutOfMemoryErrorgarbage-collection
0 likes · 10 min read
