CFNetwork sendDidReceiveDataCallback autorelease "leak"
I'm at the point where I'm profiling and optimizing my application. I'm seeing a situation where CFNetwork sendDidReceiveDataCallback is creating a slew of very large objects (GeneralBlock-32768) and, from what I can tell, leaving them in my app's main autorelease pool (created in the main() function).
This is OK if the application is only used for a few minutes, but after a while they really add up, taking something like 5/7ths of all the memory used by the application. Because they're in the main autorelease pool, they're never released until the app is closed.
I've tried wrapping various network-intensive portions of the app with my own inner autorelease pools, and draining those as appropriate; however, it looks like these allocations are not added to that autorelease pool-- instead they're added to the main autorelease pool in CFRunLoopRunInMode.
Any suggestions on how I can occasionally clean out these allocations?
|