I have 5Mb string and 5M objects that should reference it. So, if i write a.src = new String(s) instead of a.src = s, they will share it? 
-
-
Replying to @DmitryBaranovsk
@DmitryBaranovsk The objects (wrappers) won't be shared, but the 5Mb string will.1 reply 1 retweet 1 like -
Replying to @slightlylate
@slightlylate So primitive will be shared, while object will be copied? Shouldn’t be opposite?3 replies 0 retweets 0 likes
Replying to @DmitryBaranovsk
@DmitryBaranovsk intrinsic strings are immutable. Why allocate more than a pointer? And you *asked* for wrapper allocation via "new"
6:02 PM - 15 Jan 2014
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
& Web Standards TL; Blink API OWNER
Named PWAs w/
DMs open. Tweets my own; press@google.com for official comms.