K
K
Konstantin2020-07-21 20:50:39
Angular
Konstantin, 2020-07-21 20:50:39

Do I need to unsubscribe in this case?

combineLatest(
            this.eventsService.subjectSortingDistribution.pipe(
            ),
            this.eventsService.subjectFilterDistribution.pipe(
            ),
            this.eventsService.subjectFilterDistributionReset.pipe(
              ),

            this.eventsService.subjectDistributionListReload,
        )
            .pipe(takeUntil(this._onDestroy))
            .subscribe(() => {
              
            });


Should I unsubscribe from combineLatest:

let subscription = combineLatest();

onDestructor() {
     subscription.unsubscribe();
}


Or will it already do:

.pipe(takeUntil(this._onDestroy))?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel Shvedov, 2020-07-21
@Junart1

Already does takeUntil

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question