Tag

SoftReference

1 views collected around this technical thread.

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.

JavaPhantomReferenceReference Types
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.

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

JavaPhantomReferenceReference
0 likes · 14 min read
Understanding Java Reference Types: SoftReference, WeakReference, and PhantomReference Implementation Details