In my app, I've noticed that when I change states, the $scope variables still exists and get logged on a timeout. Why is this? How can I remove it completely so it doesn't take up heap memory?
what is mean is, after a state change from the controller
$scope.$on("$destroy",function(){
setTimeout(function(){
console.log($scope.whatever);
},10000);
});
$scope.whatever still logs meaning it was never removed! What is going on? I thought a destroy event would destroy everything within the scope as well?