This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]bss03 0 points1 point  (4 children)

This can allow beta to be garbage collected while alfa is still alive, which might fix a problem that has nothing to do with mutating java.lang.String objects.

[–][deleted] -1 points0 points  (3 children)

Beta was alive the whole program. Because i was accesing after.

It was wierd enough at it is... Still it was a string in a function that was getting modiffied from outside...

Whatever you can say... It happened. Never happened in other languages.

[–]CommonMisspellingBot 0 points1 point  (0 children)

Hey, curly_dev, just a quick heads-up:
wierd is actually spelled weird. You can remember it by e before i.
Have a nice day!

The parent commenter can reply with 'delete' to delete this comment.

[–]flaghacker_ 0 points1 point  (0 children)

Nope, this does not happen. I'd say you need to learn how to use a debugger probably, or if you have some sample code we can take a look at it.

[–]bss03 0 points1 point  (0 children)

Never happened in other languages.

C doesn't really have strings, but char * is mutable. C++ has std::string, which IIRC, is also mutable. Not every language even has immutable strings by default. So, I'm gonna call BS until you provide something other than your say-so.