gc callback not always fired
soldair opened this issue · 0 comments
soldair commented
while hunting a memory leak in a clients application i wrote https://github.com/soldair/weak-tracker. After a lot of chasing my own tail found that many gc events never get fired even though the refs are dead (as tested with weak.isDead)
I spent a little time trying to reproduce it outside of their code base and haven't yet but i wanted to document the problem and my work around so maybe someone with a better understanding of v8 gc can figure it out.
https://github.com/soldair/weak-tracker/blob/master/index.js#L90
this is really important because if this event fails to fire it kinda defeats the purpose of the module.