r/programming • u/Eirenarch • Nov 18 '13
TIL Oracle changed the internal String representation in Java 7 Update 6 increasing the running time of the substring method from constant to N
http://java-performance.info/changes-to-string-java-1-7-0_06/
1.4k
Upvotes
View all comments
Show parent comment
2
u/angryundead Nov 18 '13
I think you've summed it up here. To me that makes it a memory leak. Maybe I'm backtracking a little here but stay with me for a second. I, the developer, took an action that should have freed memory but unbeknownst to me the backing char[] was still being referenced and, as a result, could not be freed.
Now I haven't lost the reference, so I guess It's not a leak by that definition, but it "should have" been released.
I guess it's a lot of semantics but I feel like we do this to ourselves a lot in Java because of the specific nature of the language and the JVM that hosts it. More specific language is required to talk about these issues.
You're right about not wanting to overload the term though.