Conversation
fc9863d to
41d30b7
Compare
dherman
left a comment
There was a problem hiding this comment.
This looks great, it's just a little bit subtle and I don't 100% understand yet. How did the ManuallyDrop logic prevent the queue reference count from decrementing, and how does the Option fix that?
@dherman Since This changes the strategy so |
41d30b7 to
80a3395
Compare
80a3395 to
51a17a7
Compare
Fixes a memory leak in
Rootreported in #746.This PR includes two commits:
0.This is the bug referenced above. It stems from a misunderstanding of N-API. It's not sufficient to decrement the reference count to
0, the reference must also be deleted.Optionto store the reference instead of usingManuallyDrop.While not as extreme, the global event queue reference counter was always incrementing. It would never be freed, event after the context ended.