-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Is this a leak? #505
Comments
Is that the exact code you used? Can you share the context for it? |
@jspahrsummers that's the exact code. I created an empty project and placed those lines at the top of |
Would you mind uploading a saved Instruments trace somewhere? |
I tried writing a unit test to reproduce this issue, but wasn't able to trigger a leak: https://github.com/ReactiveCocoa/ReactiveCocoa/compare/sequence-leak |
How come you're not going through Were you able to reproduce my results in instruments at all? FWIW it appears to be the same on the device. Also, turns out it leaks even if you don't convert back to an array, but I guess your tests show that you already know that. |
@bogardon I actually do see something similar when profiling our app, but nothing that helps me figure out the exact leak, why it's occurring, or how to best fix it. I was hoping a unit test could narrow it down and give us something reproducible. :\ |
If I change line 103/104 in What's really confusing me now is why some of the items that Instruments claims to have leaked shows an allocation history where it reaches a reference count of 0, like this: I googled around and people say it's related to not calling |
@bogardon How happen with this patch?
It is dangerous with my experience that use of |
@kkazuo's change does fix the problem. Could you open a PR with the fix please? |
That fix was truly bizarre, but I've tagged #506 in a v1.8.1 tag. |
I ran this in instruments and:
Just thought I put this here while I try to figure this out...
The text was updated successfully, but these errors were encountered: