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

Potential Leaks in Xcode 7 when using static Analyzer #116

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kishorekumarek
Copy link

We are getting Potential Leaks in Reachability.m

Leaks showing in methods "reachabilityWithHostname:" and "reachabilityWithAddress:".

Line numbers 101 and 114 in Reachability.m, "Potential leak of an object stored into 'ref'"

Attached the screenshot of the issue.

screen shot 2015-09-25 at 12 20 07 am

@jcarroll3
Copy link

The property, which is set in the init is assign. If you auto release its highly likely you'll get a zombie.

I think this alteration will fix the SA error and maintain functionality. #118

@arvryna
Copy link

arvryna commented Jun 2, 2016

Any updates on this ?

@3a4oT
Copy link

3a4oT commented Aug 3, 2016

Hey is there some person who have permission to merge??

@tonymillion
Copy link
Owner

The problem here is it doesn't account for the
CFRelease(self.reachabilityRef);

On line 175 which takes care of freeing the SCNetworkReachabilityCreate* object

@valerieosmith
Copy link

It's true that the SA doesn't account for the CFRelease in the dealloc, so there is no actual leak. But this silences the SA and also makes ownership of the object clear: #165

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

Successfully merging this pull request may close these issues.

None yet

6 participants