Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 06-03-2008, 04:34 PM   #1 (permalink)
bonehead
New Member
 
Join Date: Apr 2008
Location: Onomatopoeia, Lugubriousylvania
Posts: 225
bonehead is an unknown quantity at this point
Default 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?
bonehead is offline   Reply With Quote
 

» Advertisements
» Online Users: 468
20 members and 448 guests
7twenty7, buggen, ClerurcifeDer, Clouds, Duncan C, e2applets, iAppDeveloper, ipodphone, KarlJay, linkmx, orninn, PowerGoofy, ryantcb, sacha1996, Sami Gh, Speed, stanny, Steven.C, Studder, yomo710
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,638
Threads: 94,102
Posts: 402,824
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Studder
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 11:42 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.