4 ms·
Huh? It creates 1 object allocation per enqueue.
by paulddraper 1y ago
Huh?
It creates 1 object allocation per enqueue.
- Inviz 1y agoyeah but it creates closure as well, which typically references some objects that isn't easy to GC. So if you have long-living promise with some data captured in closure, it will not be cleared. So doing then().then().then() may not release objects referenced in callbacks that resolved time ago.
- paulddraper 1y agoThere are zero closures here.