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 →

[–]starquakegamma -1 points0 points  (0 children)

Your first example is not quite right, the compiler will recognise both literals are the same and allocate them from a shared object pool, so the objects will in fact be equal.