Skip to content

Comment on A surprising JavaScript memory leak found at Meteor

Comments

It's more of a surprising non-leak caused by clever GC that is insufficiently clever to handle pathological code. Interesting explanation, but yet another reason to be very careful of setInterval.

Not only setInterval though. This sort of leak can also show up if the closure is a DOM event handler or is otherwise exposed.

It can show up anywhere — and in fact event handlers are a major source of leaks in general — but the point is that the leak doesn't occur as frequently as you might expect not that it occurs.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.