Skip to content

Instantly share code, notes, and snippets.

@jaw187
Created April 3, 2015 12:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaw187/cb5266bb3d9b415b37c0 to your computer and use it in GitHub Desktop.
Save jaw187/cb5266bb3d9b415b37c0 to your computer and use it in GitHub Desktop.
Async Leakageseses
var bad = function (options, callback) {
var a = options.a;
doSomethingAsync(function (err, res) {
callback(err, res);
});
};
var good = function (options, callback) {
var a = options.a;
doSomethingAsync(function (err, res) {
delete options;
delete a;
callback(err, res);
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment