Hacker News new | ask | show | jobs
by nolanl 1617 days ago
That's really interesting. I wonder if this is a Chromium-only issue? It may be worth filing a bug: https://bugs.chromium.org

I'm not an expert in this space, but it seems to me that the JavaScript engine could eventually clean up that memory, maybe based on some heuristics (e.g. the size of the original string, whether any references to the original string exist, etc.).

1 comments

https://bugs.chromium.org/p/v8/issues/detail?id=2869

"Issue 2869: Substring of huge string retains huge string in memory"

Status: Assigned (Open)

Reported 2013

Same issue in Java at least for older JDKs. We used to have special (SAP) internal commands to detect this issue in the Eclipse Memory Analyzer.