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 memory leak and fix crash #152

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

classic-chris
Copy link

Remove the overrides to becomeFirstResponder, resignFirstResponder, and isFirstResponder as they are causing UIKit to behave erroneously by creating a strong reference to the CardTextField that is not being released. Please see Issue #151 for details and reproducible steps.

My theory is that UIKit is having trouble that both the CardTextField and the child text field (NumberInputTextField for example) were both claiming to be the first responder at the same time.

Note that this could potentially be a breaking change if someone was relying on the logic in these overriden functions.

…to the CardTextField as a result of bugs in overriding first responder functions.
…e a child text field resigns and the CardTextField itself becomes first responder. Note that the logic in becomeFirstResponder is the only way to ensure that the memory leak does not reappear.
Copy link

@AmauryVela AmauryVela left a comment

Choose a reason for hiding this comment

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

This changes worked perfectly, it solved the crash we where having, please merge it. Nice job @classic-chris thanks!

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.

5 participants