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

Possible Retain cycle #18

Closed
kwongius opened this issue Feb 24, 2014 · 2 comments
Closed

Possible Retain cycle #18

kwongius opened this issue Feb 24, 2014 · 2 comments

Comments

@kwongius
Copy link

We are using TURecipientsDisplayController and we believe there may be a retain cycle. The property contentsController is strong and when the view controller creates and holds a TURecipientsDisplayController, it never gets deallocated. I was unable to find a reason for the property to be strong, but I may have missed something.

TURecipientsDisplayController.h (Line 58)

@Heroico
Copy link

Heroico commented Dec 2, 2014

I have experienced the same issue.
I had set up the recipient library as in the example, and a reference cycle with my View Controller was indeed created.

As a workaround, I broke the reference cycle in my controller by hand (because it is not pushing or presenting anything):

- (void)viewDidDisappear {
...
   self.recipientDisplayController.contentsController = nil;
}

@davbeck
Copy link
Owner

davbeck commented Dec 23, 2014

contentsController should indeed be a weak reference.

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

No branches or pull requests

3 participants