Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@kangwang1988
Copy link
Contributor

Fix an objc_overrelease_during_dealloc_error, it is reported as below:
Screen Shot 2019-10-11 at 12 17 07 AM

This issue is introduced in: 5075172fe

@kangwang1988 kangwang1988 requested review from dnfield and gaaclarke and removed request for dnfield and gaaclarke October 10, 2019 16:26
Copy link
Member

@gaaclarke gaaclarke left a comment

Choose a reason for hiding this comment

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

Thanks again for the catch @kangwang1988. I just found out the other day my assumptions on the scoped classes are wrong, it doesn't retain in the constructor. This too is a 2 line fix, the at line 57 observer just needs to be retained, the constructor doesn't perform a retain.

@gaaclarke
Copy link
Member

Landed #13093 which fixes this. Thanks for the find, 13093's approach is a bit more inline with the code. I was hoping to get us a nice unit test for this but I'm running into troubles getting unit testing working with these classes. If I get some more time today I have one more approach I want to try to test it.

@gaaclarke gaaclarke closed this Oct 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants