Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When to dispose an observer #198

Open
MrJox opened this issue Sep 10, 2018 · 0 comments
Open

When to dispose an observer #198

MrJox opened this issue Sep 10, 2018 · 0 comments

Comments

@MrJox
Copy link

MrJox commented Sep 10, 2018

The issue is a little tricky for me to understand.

When should I dispose an observer/nextObserver if at all? Does the lib automatically call reactive.bag.dispose() when we quit current view controller in navigation hierarchy tree?

If not, where should I dispose it manually? Currently I dispose it manually on viewDidDisappear() which leads me to add observers on viewDidAppear because viewDidLoad isn't called every time you navigate thru view controllers back and forth.

But then again is it a rule of thumb to add and dispose observers every time you enter and leave a view controller (especially when VCs are bound thru navigation controller)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant