I have the following declaration in an Angular 8 component:

```
@ViewChildren(SelectComponent) selects: QueryList<SelectComponent>;

```

where `SelectComponent` is declared N times in an \*ngFor.

To loop through the `selects` array when there are any edits, I subscribe to the changes:

```
this.selects.changes.subscribe(list => {
            list.forEach(item => {
                 alert('in forEach');
                // do something
            });
        });

```

The loop works fine, but the problem is that when I close and reopen the main component, the previous `selects` apparenty are not cleared, because the alert shows up several times.

How to clear/unsubscribe from these subscribes when the component is closed?