elviin
unread,May 6, 2012, 9:38:39 AM5/6/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ASIHTTPRequest
Hi
I've profiled my application and I can not fix the lines in -
(void)runPACScript:(NSString *)script so that the profiling
application "Instruments" does not report leaked objects in this
method. XCode 4.3.2, iOS 5.1.
The line responsible for the leaks is
NSArray *proxies =
[NSMakeCollectable(CFNetworkCopyProxiesForAutoConfigurationScript((CFStringRef)script,
(CFURLRef)[self url], &err)) autorelease];
I tried to release the CFArrayRef returned from
CFNetworkCopyProxiesForAutoConfigurationScript myself, using the
__bridge cast or CFBridgingRelease but the retain count of the array
is still 1. If I autorelease it then I get double free call fot the
object.
Part of the report from Instruments:
Leaked Object # Address Size Responsible Library Responsible Frame
CFRunLoopSource, 1 0x63c770 112 Bytes My App -[ASIHTTPRequest
runPACScript:]
CFBag, 1 0x655600 48 Bytes My App -[ASIHTTPRequest
runPACScript:]
Malloc 64 Bytes, 1 0x6fbb50 64 Bytes My App -[ASIHTTPRequest
runPACScript:]
Malloc 16 Bytes, 1 0x61eaf0 16 Bytes My App -[ASIHTTPRequest
runPACScript:]
Malloc 64 Bytes, 1 0x6101f0 64 Bytes My App -[ASIHTTPRequest
runPACScript:]
Malloc 16 Bytes, 1 0x614100 16 Bytes My App -[ASIHTTPRequest
runPACScript:]
I think the code is correct. The profiling was made on real device,
iOS5.1.
Thank you for a hint.