Here is the code where I am having memory leaks:
SCNetworkReachabilityRef reach = SCNetworkReachabilityCreateWithName(kCFAllocatorSy stemDefault, "google.com");
SCNetworkConnectionFlags flags;
SCNetworkReachabilityGetFlags(reach, &flags);
[flags release];
[reach release];
Those release don't do it.
First of all, the SCNetworkConnectionFlags is an enum, so it doesn't have to be released. Remove the [flags release] and problem solved.
Moving on, the SCNetworkReachabilityRef is released through
CFRelease(reach);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With