title: Destructor for Angular 1.5 Service
body: <p>I have an Angular 1.5 service that wraps a SignalR proxy. When the Angular app is destroyed, I'd like to explicitly leave all SignalR groups that the user has registered for rather than waiting on the explicit SignalR timeout. </p>
  
  <p>I know that with Angular 1.5x controllers, I can listen for:</p>
  
  <pre><code>$scope.$on("$destroy", function handler() { ... });
  </code></pre>
  
  <p>But I am not sure how I "clean up" within a service and release resources I no longer need. Any suggestions?</p>