Tag

JDK6

0 views collected around this technical thread.

Qunar Tech Salon
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.

Garbage CollectionJDK6JDK7
0 likes · 10 min read
Understanding Java String.substring Memory Leak in JDK 6 and Its Fix in JDK 7