The function CFNetworkCopyProxiesForAutoConfigurationScript causes a consistent memory leak.
Simplifying the code provides:
Which leaks. Is this a bug in CFNetwork or is there another way of clearing the memory allocated ?
Simplifying the code provides:
Code Block var err: Unmanaged<CFError>? = Unmanaged.passRetained(CFErrorCreate(nil, "" as CFErrorDomain, 0, nil)) let proxiesCFArrayRef = CFNetworkCopyProxiesForAutoConfigurationScript( script as CFString, self.wsAsHTTPURL as CFURL, &err ) err?.release() proxiesCFArrayRef?.release()
Which leaks. Is this a bug in CFNetwork or is there another way of clearing the memory allocated ?