Tagged articles
1 articles
Page 1 of 1
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