Status: New
Owner: ----

New issue 3175 by [email protected]: Intermediate strings in a string append or concat are not released
http://code.google.com/p/v8/issues/detail?id=3175

```
var s = {}, idx = 0, j=0;
for(idx=0; idx != 10000;++idx) {
    var o = "";
    for(j=0;j!=10000;++j) o+="a";
    s[idx] = o;
}
```

in Chrome, execution just stops. in NodeJS, `FATAL ERROR: JS Allocation failed - process out of memory`

Same result when using an expicit concat rather than append (o = o + a).

If an array is used instead of appending, the code runs (which means it isn't strictly an object size issue):

```
var s = {}, idx = 0, j=0;
for(idx=0; idx != 10000;++idx) {
    var o = [];
    for(var j=0;j!=10000;++j) o.push("a");
    s[idx] = o.join("");
}
```

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to