Skip to content

Commit

Permalink
Fix for memory leak in SC.Response
Browse files Browse the repository at this point in the history
  • Loading branch information
wagenet committed Sep 8, 2010
1 parent 9d3b2ce commit e2474b7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions frameworks/foundation/system/response.js
Expand Up @@ -529,8 +529,14 @@ SC.XHRResponse = SC.Response.extend({
this.set('status', status);

}, this);
// avoid memory leak in MSIE: clean up
rawRequest.onreadystatechange = function() {} ;

// Avoid memory leaks
if (!SC.browser.msie) {
SC.Event.remove(rawRequest, 'readystatechange', this, this.finishRequest);
} else {
rawRequest.onreadystatechange = null;
}

return YES;
}
return NO;
Expand Down

0 comments on commit e2474b7

Please sign in to comment.