You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 29, 2019. It is now read-only.
While looking for memory leaks in our application I noticed references to destroyed contexts, preventing them from being garbage collected:
line 2149:
$scope.$on('$destroy', function() {
scope.$destroy();
});
line 4805:
var scope = originalScope.$new();
originalScope.$on('$destroy', function(){
scope.$destroy();
});
both keep a reference to child scope, those listener should be removed when child scope is destroyed:
var offDestroy = $scope.$on('$destroy', function() {
scope.$destroy();
});
scope.$on("$destroy", offDestroy);
and
var offDestroy = originalScope.$on('$destroy', function(){
scope.$destroy();
});
scope.$on('$destroy', offDestroy);
The text was updated successfully, but these errors were encountered:
While looking for memory leaks in our application I noticed references to destroyed contexts, preventing them from being garbage collected:
line 2149:
$scope.$on('$destroy', function() {
scope.$destroy();
});
line 4805:
var scope = originalScope.$new();
originalScope.$on('$destroy', function(){
scope.$destroy();
});
both keep a reference to child scope, those listener should be removed when child scope is destroyed:
var offDestroy = $scope.$on('$destroy', function() {
scope.$destroy();
});
scope.$on("$destroy", offDestroy);
and
var offDestroy = originalScope.$on('$destroy', function(){
scope.$destroy();
});
scope.$on('$destroy', offDestroy);
The text was updated successfully, but these errors were encountered: