Tagged articles
205 articles
Page 3 of 3
Java Backend Technology
Java Backend Technology
Oct 24, 2017 · Fundamentals

ThreadLocal OOM? Exploring Singleton Pitfalls in Java Multithreading

This article examines common Java singleton implementations—including eager, thread‑safe lazy, double‑checked locking, and static inner‑class approaches—explaining their requirements, potential memory‑leak pitfalls such as ThreadLocal‑induced OOM, and how improper usage in multithreaded environments can lead to unexpected instance creation and performance issues.

Design PatternsJavaOOM
0 likes · 6 min read
ThreadLocal OOM? Exploring Singleton Pitfalls in Java Multithreading
Java Captain
Java Captain
Jul 24, 2017 · Fundamentals

Lesser‑Known Java Thread Techniques and Usage

This article explores five advanced Java thread topics—including naming, priority, ThreadLocal storage, daemon vs. user threads, and processor affinity—providing code examples, practical tips, and guidance for both beginners and seasoned developers.

DaemonThreadProcessorAffinityThreadLocal
0 likes · 12 min read
Lesser‑Known Java Thread Techniques and Usage
Qunar Tech Salon
Qunar Tech Salon
Apr 6, 2015 · Fundamentals

How to Write Java Code That Causes a Memory Leak

Various techniques for deliberately creating memory leaks in Java are presented, including using long‑running threads with custom class loaders, static references, ThreadLocal misuse, improper handling of resources like connections and streams, and flawed implementations of hashCode/equals, each illustrated with code examples.

JavaStatic ReferenceThreadLocal
0 likes · 6 min read
How to Write Java Code That Causes a Memory Leak