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

Fix an STPURLCallbackListener retain cycle. #846

Merged
merged 4 commits into from Dec 12, 2017

Conversation

bdorfman-stripe
Copy link
Contributor

Previously there was a bug where STPURLCallbackListener retained its listeners, which meant that STPRedirectContext had a retain cycle and would not deallocate while it was actively listening for callbacks. Fixing this is in some ways a breaking API change.
This commit fixes the bug, and also updates the docs to explicitly mention that you need to retain the instances you make.
It also replaces referencing to STPAPIClient source polling (which is deprecated) and instead links to the sources best practices doc.

Previously there was a bug where STPURLCallbackListener retained its listeners, which meant that STPRedirectContext had a retain cycle and would not deallocate while it was actively listening for callbacks. Fixing this is in some ways a breaking API change.
This commit fixes the bug, and also updates the docs to explicitly mention that you need to retain the instances you make.
It also replaces referencing to STPAPIClient source polling (which is deprecated) and instead links to the sources best practices doc.
Copy link
Contributor

@bg-stripe bg-stripe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

CHANGELOG.md Outdated
@@ -1,3 +1,6 @@
## 12.0.0 2017-12-XX
* `STPRedirectContext` will no longer retain itself for the duration of the redirect, you must explicitly maintain a reference to it yourself. If you
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

incomplete :P

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh weird. I typed more stuff locally into Atom and it seems to not have saved the file before I comitted -_- Will fix

@bdorfman-stripe bdorfman-stripe merged commit a66870a into master Dec 12, 2017
@bdorfman-stripe bdorfman-stripe deleted the bdorfman-stpurlcallback-weak branch December 12, 2017 01:04
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