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

fixed observable's disposing #33

Merged
merged 6 commits into from May 23, 2016
Merged

Conversation

chaserCN
Copy link
Contributor

When button is deallocated, observable is not disposed.

So for example, if an application downloads some data from the internet and the user decides to cancel, download wont be stopped after uiviewcontroller is dismissed.

@ashfurrow
Copy link
Member

Code looks good, thanks for adding tests, too. Looks like the new test is failing, could you take a look when you have a moment? Happy to screenhero to tackle it together. A changelog entry would be great too, thanks again!

@zipme
Copy link

zipme commented May 12, 2016

Is there way you can explicitly cancel an action?

@ashfurrow
Copy link
Member

If the action is deallocated, it should dispose of its subscriptions. Once external objects have also dispose of their subscriptions, the action's observable (the one you create) should be disposed of. You can put cancellation code in the disposable you create with the observable.

@chaserCN
Copy link
Contributor Author

The problem is that I use RxSwift 2.5 and travis has tested with RxSwift 2.1
Updating Podfile.lock does not help, travis cannot compile 2.5, seems like travis uses an outdated version of the compiler.

So as far as I see it now the problem is not in Action, but rather in RxSwift.

@ashfurrow
Copy link
Member

Ah, we'll need to change the .travis.yml file's osx_image value from xcode7.1 to xcode7.3. @chaserCN Can you add that to the PR?

@chaserCN
Copy link
Contributor Author

chaserCN commented May 22, 2016

Looks like it's ok now.

I didn't add a Changelog entry though. I guess it would be better if a native speaker did that, i'm not so confident in my English :)

@ashfurrow
Copy link
Member

Fab! I can take care of that, thanks again!

@ashfurrow ashfurrow merged commit 809484d into RxSwiftCommunity:master May 23, 2016
@ashfurrow
Copy link
Member

Thanks a lot for contributing! I've invited you to join the RxSwiftCommunity GitHub organization – no pressure to accept! If you'd like more information on what that means, check out our contributor guidelines and feel free to reach out with any questions.

ashfurrow added a commit that referenced this pull request May 23, 2016
@piotr-dudek piotr-dudek mentioned this pull request Jun 22, 2016
@werediver werediver mentioned this pull request Mar 11, 2017
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

Successfully merging this pull request may close these issues.

None yet

3 participants