3 ms·
Just today (re)discovered FinalizationRegistry which is a big help if you are worried about what may be left behind. It's quite nice to be able to see a log of
by beardyw 2y ago
Just today (re)discovered FinalizationRegistry which is a big help if you are worried about what may be left behind. It's quite nice to be able to see a log of objects disappearing.
- syspec 2y agoNever heard of `FinalizationRegistry`, how do we access it?
- simlevesque 2y agohttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
- jaffathecake 2y agoHah, that's what I was playing with when we discovered this issue.
- beardyw 2y agoIt's frustrating sometimes waiting for GC to kick in. The Chrome debugger seems to offer a GC now thing, but either it didn't work or it's just a kind of suggestion.
- jaffathecake 2y agoI know this isn't helpful, but it worked fine for me.
- laurencerowe 2y agoI found FinalizationRegistry had a severe performance cost in v8 when I tried it last year.