2 ms·
>Object pooling is generally considered to be the worse approach, because it's tricky to know when to put object back in the pool. Realistically this mean ref c
by coldtea 9y ago
>Object pooling is generally considered to be the worse approach, because it's tricky to know when to put object back in the pool. Realistically this mean ref counting.
It's trivial to know "when to put object back in the pool" when just using it to avoid object creation in specific hot paths...
If one adds "ref counting" then they're re-implementing their own full-ish GC on top of JS...