when to use $destroy
<p>I have a get request in angular that returns a streaming response. The request is made through the <a href="http://oboejs.com/" rel="nofollow noreferrer">oboe</a> library. The streaming response basically returns json values and my angular front end adds each of these streams to the scope on receiving each json object. Since oboe is not a part of angular itself, I am using $scope.$digest to update my scope. This is cause a huge memory leak for larger requests. I have figured that I have to use $destroy at some point. Can someone please tell me on which event I should use the $destroy for optimal performance?  </p>