Join Slack
Powered by
I think substrings are already "views".
# advent-of-code
k
karelpeeters
12/08/2018, 9:15 PM
I think substrings are already "views".
o
orangy
12/08/2018, 9:16 PM
not in the newest JVMs
k
karelpeeters
12/08/2018, 9:17 PM
Huh. Did it become to complicated to GC the unnecessarily large backing arrays out or something?
k
keturn
12/08/2018, 9:19 PM
that's what I would wonder. if
b = a.substring(7, 13)
doesn't
copy, then
a
can't be garbage collected while
b
lives.
keturn
12/08/2018, 9:19 PM
which is
sometimes
what you want but does not sound like a good default.
6
Views
Open in Slack
Previous
Next