Closed ripldev closed 6 years ago
Do you reference self within the completion handler? It's possible you have a strong retain cycle going on. Does this occur with a nil completion handler?
It happens with zero references to self
in the completion handler. It appears to be related to showing the webview although I am not sure why
This should be fixed in the next TwitterKit release. I believe (this)[https://github.com/twitter/twitter-kit-ios/pull/12] pull request fixes the issue.
Something in the sdk appears to hold on to a reference to the view controller that was topmost when the twitter login is shown.
Expected behavior
When an app's view controller is displayed and a call made to
- (void)logInWithCompletion:(TWTRLogInCompletion)completion;
it shows the twitter login view controller. Then when the user cancels (or completes) the login, there should not be any references holding on to the app's view controller that would prevent the app's view controller from being deallocated when the app's view controller is dismissed.Actual behavior
the app's view controller is never deallocated even after being dismissed and continues to exist.
Steps to reproduce the behavior
logInWithCompletion
when the button it tapped and a button to dismiss the view controller and a simple log in thedealloc
.dealloc
is never called