title: Async pipe to unsubscribe from ReplaySubject
body: <p>I have the following service to accommodate for a global spinner in my app:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import {
    Injectable
  } from '@angular/core';
  import {
    Observable
  } from 'rxjs/Observable';
  import {
    ReplaySubject
  } from 'rxjs/ReplaySubject';
  
  @Injectable()
  export class SpinnerService {
    private visible = new ReplaySubject &lt; boolean &gt; ();
  
    showSpinner() {
      this.visible.next(true);
    }
  
    hideSpinner() {
      this.visible.next(false);
    }
  
    getSpinnerVisibility(): Observable &lt; boolean &gt; {
      return this.visible.asObservable();
    }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>Then the following just above my <code>router-outlet</code> in my main app component:</p>
  
  <p><code>&lt;app-spinner *ngIf="spinnerService.getSpinnerVisibility() | async "&gt;&lt;/app-spinner&gt;</code></p>
  
  <p>The question is, should the <code>async</code> pipe here function as normal to unsubscribe without memory leaks from this <code>ReplaySubject</code> or do I have to manually unsubscribe?</p>