caolan/async — pull request #681 by chainsawsalad (2014-12-06 19:42:26+00:00)
Title: Dereference internal "results" data structures (memory leak)

Once “results” is passed to the callback, the method no longer needs reference to it. Setting to null will encourage Garbage Collection to clean it up. Because the callback is called from within a closure, GC doesn’t automatically recognize that “results” is no longer needed in this context.

After running numerous Heap Snapshot comparisons over time, it's clear that these methods hang onto these objects well after execution time. If the data being passed into results is very large, like in my case the page sources of URLs, the memory leaks becoming crippling after thousands of iterations.