Qunar Tech Salon
Dec 24, 2014 · Fundamentals
Understanding Java String.substring Memory Leak in JDK 6 and Its Fix in JDK 7
This article explains how the original JDK 6 implementation of String.substring could retain large character arrays and cause apparent memory‑leak‑like OutOfMemoryError, describes the underlying fields, reproduces the issue, and shows how JDK 7’s copy‑on‑substring redesign resolves the problem.
JDK6JDK7Java
0 likes · 10 min read