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

Delegate never released #120

Open
stephenkopylov opened this issue Jan 27, 2017 · 7 comments
Open

Delegate never released #120

stephenkopylov opened this issue Jan 27, 2017 · 7 comments

Comments

@stephenkopylov
Copy link

Hi everyone and thank you for this library!

But, after a day of research I found really sad bug:

If we do any database modifications after "performFetch" - delegate will be retained somewhere and won't be released.

It brings a lot of pain and makes the library unusable =(

I have slightly edited sample project to make this bug more obviously:
http://rgho.st/8b9RLZN6L

Have a look on "viewDidLoad" in "ExampleTableViewController" and try to comment and uncomment calling of "writeObjects" before and after "performFetch". Then press back and you will see that "ExampleTableViewController" will never released.

@bigfish24
Copy link
Contributor

Sorry about this! I thought I had resolved any retain cycles. I will check out the sample app and hopefully resolve.

@stephenkopylov
Copy link
Author

Hi, Adam!
Did you check it?

@AnthonyMDev
Copy link

I'd really like to use this library also, but a retain cycle in the delegate makes this unusable. Hope to see this resolved soon!

@0xced
Copy link

0xced commented Mar 26, 2017

I think I have observed the same issue in ABFRealmTableViewController. Here’s the workaround I am using: 0xced/ABFRealmTableViewController@093d6ed

I still haven’t figured out the retain cycle though. 🙁

@0xced
Copy link

0xced commented Mar 26, 2017

Oh, apparently this issue is already being investigated in #102.

@smolskyaleksey
Copy link

@0xced your hot fix is help me. Need to call unregisterChangeNotifications. But really lib have problem with delegate,self.notificationRunLoop and autorelease pool. Library still retain delegate.

@stephenkopylov
Copy link
Author

Any news?

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

5 participants