Good question! I choose a ReplaySubject just to be defensive in case there is some code-path that tries to setup a subscription after onDestroy has already been called. The ReplaySubject will re-emit the original "hey - I've bee destroyed!" signal, causing this new subscription to be torn down immediately. If you use a regular Subject, the signal would not be repeated on this second subscription. Admittedly, the situation is pretty rare, but I do it for that extra level of defense.
I apreciate your content so much! please continue to upload ! Edit: SInce you are up for suggestions I was wondering if you can make a Video on how to increase Security of your App at Developement Time
Wow I like these bite sized videos, short but informative and clear, thanks you!
Nice, short to the point and clearly explained... Thank you!
please dont stop making videos ever. I am counting on you to make my programmer life 10x better.
Great video. I was wondering why we would use ReplaySubject in the third method instead of a regular Subject?
Good question!
I choose a ReplaySubject just to be defensive in case there is some code-path that tries to setup a subscription after onDestroy has already been called. The ReplaySubject will re-emit the original "hey - I've bee destroyed!" signal, causing this new subscription to be torn down immediately. If you use a regular Subject, the signal would not be repeated on this second subscription.
Admittedly, the situation is pretty rare, but I do it for that extra level of defense.
You are right Im struggling with this since last 2 days and there are so many rxjs observables i have removed based on memory dump.
I apreciate your content so much! please continue to upload !
Edit: SInce you are up for suggestions I was wondering if you can make a Video on how to increase Security of your App at Developement Time
Thank you for your sharing. That was very informative 👍
Very helpful, thank you!
wow. Very good! Thank you very much for this video! :-)
Hope I am not leaking memory by this.channel.subscribe()😅
😀, I was trying to think of a good pun to end on that!
@@ScottABailey It was good indeed .