title: The disconnect method of @angular/cdk/collections DataSource<T> is not being called
body: <p>The disconnect method of the custom DataSource is not being called when I leave the page that has initialized it.</p>
  
  <p>I have developed a custom DataSource so I could use a table with server sort and pagination.</p>
  
  <p>Everything works nice, the connected method is called when the custom DataSource class is initialized with the new CustomDataSource() in my page ngOnInit method, but when I get out of the page, the disconnect method, that shoud clean the used subjects, is not called.</p>
  
  <pre><code>class SomeComponent implements OnInit, OnChanges, AfterViewInit {
    ngOnInit(): void {
       this.dataSource = new CustomDataSource(this.logService, 
       this.mensagemService);
    }
  }
  
  class ProcessosLogsDataSource implements DataSource&lt;LogModel&gt; {
    private logsSubject = new BehaviorSubject&lt;LogModel[]&gt;([]);
    private loadingSubject = new BehaviorSubject&lt;boolean&gt;(false);
    private lengthSubject = new BehaviorSubject&lt;number&gt;(0);
    public loading$ = this.loadingSubject.asObservable();
    public length$ = this.lengthSubject.asObservable();
  
    constructor(
        private logService: LogService,
        private mensagemService: MensagemService) { }
  
    connect(collectionViewer: CollectionViewer): Observable&lt;ProcessoLogModel[]&gt; { // is being called when the dataSource is being initialized in the SomeComponent ngOnInit method
        return this.logsSubject.asObservable();
    }
  
    disconnect(collectionViewer: CollectionViewer): void {// not being called
        this.logsSubject.complete();
        this.loadingSubject.complete();
        this.lengthSubject.complete();
    }
  }
  </code></pre>