Jurek Wozniak
Sep 24, 2022

Thanks! To be on the safe side `.complete();` can be added.

In the exact case as in the example all subscriptions to the `componentDestroyed` subject will end with the first emission/`.next();` call, because this subject is used as the source of the`takeUntil` operator, so it wouldn't have any subscriptions made to it afterwards and there will be no references to anything external, so there shouldn't be any memory leaks/etc.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Jurek Wozniak
Jurek Wozniak

Written by Jurek Wozniak

Passionate about front-end software development.

No responses yet

Write a response