Comment by bastawhiz
6 hours ago
Be careful with this, though. If a promise is expected to resolve and it never does, and the promise needs to resolve or reject to clean up a global reference (like an event listener or interval), you'll create a memory leak. It's easy to end up with a leak that's almost impossible to track down, because there isn't something obvious you can grep for.
This is addressed at the end of the article:
That should honestly be much higher up and much more clearly spelled out.