Skip to content

Fix memory leak and fix crash#152

Open
classic-chris wants to merge 2 commits intoprolificinteractive:masterfrom
classic-chris:bug/memory_leak
Open

Fix memory leak and fix crash#152
classic-chris wants to merge 2 commits intoprolificinteractive:masterfrom
classic-chris:bug/memory_leak

Conversation

@classic-chris
Copy link
Copy Markdown

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
Copy Markdown

@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