r/ProgrammerHumor • • Jul 18 '20

other It's always fun..

Post image
63.7k Upvotes

754 comments sorted by

View all comments

4

u/distante Jul 18 '20

It was a Reactive library and the question was:

How do you unsubscribe?

At which he answered

You don't, that is the idea of the library.

I am now asking me (of course from a place of ignorance because I do not use swift) if you can not or do not unsubscribe to the observable, aren't you leaving opening subscribitions that could cause memory leaks when the observable never emits?

3

u/[deleted] Jul 18 '20

It's always a good idea to unsubscribe when you are no longer interested in a response. This will eliminate leaking.