Tag

WeakReference

0 views collected around this technical thread.

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.

JavaMemoryManagementWeakReference
0 likes · 10 min read
Understanding Java ThreadLocalMap: Structure, Operations, and Memory Management
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
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jun 4, 2020 · Fundamentals

Understanding Java Reference Types and Garbage Collection in JDK 8

This article explains the four kinds of Java references—strong, soft, weak, and phantom—how they interact with the garbage collector, the role of ReferenceQueue, and provides practical code examples and JVM internal details to help developers manage object lifecycles effectively.

Garbage CollectionJVMJava
0 likes · 22 min read
Understanding Java Reference Types and Garbage Collection in JDK 8
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.

AndroidDialogFragmentHandler
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
Baidu Intelligent Testing
Baidu Intelligent Testing
Dec 9, 2015 · Mobile Development

Analyzing and Resolving an Android WebView Memory Leak That Causes Slow Page Loads

The article presents a detailed case study of an Android WebView memory‑leak bug that gradually slows page opening, explains how DDMS and MAT were used to pinpoint the leaking DynamicBgDrawable objects, and describes the fix of converting a strong view reference to a weak reference to eliminate the leak.

AndroidMATWeakReference
0 likes · 9 min read
Analyzing and Resolving an Android WebView Memory Leak That Causes Slow Page Loads
Baidu Intelligent Testing
Baidu Intelligent Testing
Nov 25, 2015 · Mobile Development

Analyzing and Resolving an Android WebView Memory Leak Causing Slow Page Loads

The article presents a detailed case study of an Android WebView memory leak that causes progressively slower page loads, explains how DDMS and MAT were used to pinpoint the leak in DynamicBgDrawable via a WeakHashMap reference cycle, and proposes converting the view reference to a weak reference to resolve the issue.

AndroidGCMAT
0 likes · 9 min read
Analyzing and Resolving an Android WebView Memory Leak Causing Slow Page Loads