> On May 13, 2016, at 11:09 AM, Herby Vojčík <[email protected]> wrote:
> 
> 
> 
> Brian Barnes wrote:
>> It could be, but there is a difference between:
>> 
>> var x;
>> 
>> and:
>> 
>> this.x
> 
> You should probably do `var x = XPool.get();` and at the end `XPool.put(x);` 
> and do `XPool`s for every possible X type which you want to not GC. And then 
> happily use local variable, as it should be. If things are not very parallel 
> / reentrant, the pools will likely only contains zero / single element.

I already do this, I was just showing possible problems with engines doing this 
without a hint.  Right now if I have anything that’s an object that only lives 
within a function, I move it to the class constructor, no need for the extra 
additions of a pool.

[>] Brian

_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to