Tagged articles
14 articles
Page 1 of 1
Cognitive Technology Team
Cognitive Technology Team
May 3, 2025 · Fundamentals

Understanding Java ThreadLocalMap: Structure, Operations, and Memory Management

This article explains the internal design of Java's ThreadLocalMap, covering its core Entry structure, hash table storage, linear probing for collision resolution, key operations (set, get, remove), memory‑leak scenarios, automatic cleanup mechanisms, and practical usage patterns such as thread‑context propagation and Android Looper.

JavaMemoryManagementThreadLocal
0 likes · 10 min read
Understanding Java ThreadLocalMap: Structure, Operations, and Memory Management
Bin's Tech Cabin
Bin's Tech Cabin
Jun 19, 2024 · Fundamentals

Why PhantomReference Can Track GC While WeakReference Can’t in ZGC

Exploring the differences between PhantomReference and WeakReference in Java’s ZGC, this article explains how ZGC’s concurrent phases and the should_drop method use distinct bitmap bits to determine object liveness, revealing why only PhantomReference reliably tracks object reclamation in certain finalization scenarios.

Garbage CollectionJVMJava
0 likes · 11 min read
Why PhantomReference Can Track GC While WeakReference Can’t in ZGC
IT Xianyu
IT Xianyu
Nov 5, 2020 · Fundamentals

Four Types of References in Java and Their Usage

This article explains Java's four reference types—strong, soft, weak, and phantom—detailing their purposes, behavior during garbage collection, and practical code examples that demonstrate how each reference influences object lifecycle and memory management.

Garbage CollectionJavaMemory Management
0 likes · 9 min read
Four Types of References in Java and Their Usage
Sohu Tech Products
Sohu Tech Products
May 13, 2020 · Mobile Development

Analyzing and Fixing Memory Leaks in Android DialogFragment

This article examines why DialogFragment can cause memory leaks in Android apps, analyzes the role of HandlerThread messages and Looper processing, and presents several mitigation strategies including avoiding dismiss listeners, using weak references, and custom fragment implementations to safely release resources.

DialogFragmentHandlerLeakCanary
0 likes · 11 min read
Analyzing and Fixing Memory Leaks in Android DialogFragment
Selected Java Interview Questions
Selected Java Interview Questions
Mar 2, 2020 · Fundamentals

Understanding Java Reference Types: SoftReference, WeakReference, and PhantomReference Implementation Details

This article explains Java's four reference types, focusing on the implementation and lifecycle of SoftReference, WeakReference, and PhantomReference, and clarifies how garbage collection policies, native and Java layers, and reference queues determine when these references are cleared or notified.

Garbage CollectionJavaPhantomReference
0 likes · 14 min read
Understanding Java Reference Types: SoftReference, WeakReference, and PhantomReference Implementation Details
JD Retail Technology
JD Retail Technology
Nov 24, 2017 · Mobile Development

Mastering Android MVP: Build Decoupled, Leak‑Free Apps

This article explains how to use the Model‑View‑Presenter (MVP) pattern in Android to reduce module coupling, prevent memory leaks with WeakReference, and organize code into clear layers—View, Presenter, Model, and a Data Manager—while providing step‑by‑step implementations and reusable base classes.

AndroidMVPPresenter
0 likes · 14 min read
Mastering Android MVP: Build Decoupled, Leak‑Free Apps