javascript events, memory leak 

Apparently browsers GC handling can sometimes integrate knowledge of which events can and can't happen.

Haven't confirmed this across browsers (yet), but means otherwise awkward tracking can be avoided. It also probably explains why some very common idioms around XHR and Promise don't leak memory. Which I never thought they would anyway, but didn't really know why.

javascript events, memory leak 

@krinkle This is accurate. I just ran into it recently with my emoji-picker-element project.

I actually have a test to check for memory leaks, and it turned out that there was no need to remove the IDB 'close' listener, because it automatically GC's after the database is closed.

javascript events, memory leak 

@krinkle Although he makes a good point that this is unspecced behavior. I should test it in more browsers than just Chrome, now that I think of it...

Sign in to participate in the conversation
Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!