angular-component / router

Angular Component Router - A declarative router for Angular applications
MIT License
253 stars 16 forks source link

fix: provide complete function to destroy Subjects #72

Closed kylecannon closed 3 years ago

brandonroberts commented 3 years ago

@kylecannon as I understand it, the complete isn't needed here, as the destroy subjects are internal, have no subscribers, and will be garbage collected when the component is destroyed.

kylecannon commented 3 years ago

I think you're right but I have seen conflicting information on this topic. 🤷

meeroslav commented 3 years ago

If you look at the implementation of the Subject's complete you will see that there's nothing in there that would influence garbage collection. Calling complete is only important if you have direct observers (which is not the case here).