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 > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 06-30-2008, 04:48 PM   #1 (permalink)
New Member
 
Join Date: Apr 2008
Location: Onomatopoeia, Lugubriousylvania
Posts: 225
bonehead is an unknown quantity at this point
Default CFNetwork sendDidReceiveDataCallback leaking?

In beta8 I'm seeing CFNetwork sendDidReceiveDataCallback leaving a whole bunch of objects sitting around in the my app's main autorelease pool. I'm creating some NSURLConnection objects and releasing them when finished...however, it looks like they're leaving junk in my autorelease pool that eventually causes the app to run out of memory.

(I've even tried creating a new autorelease pool before creating the NSURLConnection objects, and then draining the pool when finished with those objects: no luck.)

Anyone else seeing this?
bonehead is offline   Reply With Quote
Old 06-30-2008, 05:10 PM   #2 (permalink)
Registered Member
 
Join Date: Apr 2008
Location: Colorado
Posts: 312
jonc is an unknown quantity at this point
Send a message via AIM to jonc
Default Re: CFNetwork sendDidReceiveDataCallback leaking?

I have also been noticing this.

Is it usually some sort of connection object that wasn't allocated by any of your code? That is what I am seeing.

It doesn't seem to be happening often enough to cause me memory headaches, but my program only uses the network connection intermittently. I am pretty sure I am doing everything properly too.

I am about to walk out the door at work, but I will private message you an instruments save showing the leak later because I am curious if we are leaking the same object with a similar trace.
jonc is offline   Reply With Quote
Old 07-01-2008, 11:41 PM   #3 (permalink)
Registered Member
 
Join Date: Apr 2008
Location: Colorado
Posts: 312
jonc is an unknown quantity at this point
Send a message via AIM to jonc
Default Re: CFNetwork sendDidReceiveDataCallback leaking?

Sorry I haven't forgotten about this, I have just been insanely busy trying to get my apps done and getting ready to move 12 hours away the day after the app store launches (crazy I know).

Anyway, so I was trying to reproduce this leak at home on my laptop and I couldn't get it to show up using the simulator. I know I was running on the device the other day at work when it was happening though. I don't have certificates on my laptop and don't want to go to the trouble, but I will check it again at work. Are you only seeing this problem on the device?
jonc is offline   Reply With Quote
Old 07-03-2008, 01:27 PM   #4 (permalink)
New Member
 
Join Date: Apr 2008
Location: Onomatopoeia, Lugubriousylvania
Posts: 225
bonehead is an unknown quantity at this point
Default Re: CFNetwork sendDidReceiveDataCallback leaking?

I'm seeing very significant leaks on the device, less significant (but similar) leaks on the simulator.

On the simulator I see "GeneralBlock-32768" hanging around in ObjectAlloc

On the device I see both those and other "GeneralBlock-Foo" of various sizes.
bonehead is offline   Reply With Quote
Old 07-03-2008, 01:59 PM   #5 (permalink)
Registered Member
 
Join Date: Apr 2008
Location: Colorado
Posts: 312
jonc is an unknown quantity at this point
Send a message via AIM to jonc
Default Re: CFNetwork sendDidReceiveDataCallback leaking?

Quote:
Originally Posted by bonehead
I'm seeing very significant leaks on the device, less significant (but similar) leaks on the simulator.

On the simulator I see "GeneralBlock-32768" hanging around in ObjectAlloc

On the device I see both those and other "GeneralBlock-Foo" of various sizes.
I am seeing the same thing. Sometimes the GeneralBlocks vary in size, but it sounds like the same thing.
jonc is offline   Reply With Quote
Old 12-15-2008, 04:27 PM   #6 (permalink)
New Member
 
Join Date: Nov 2008
Posts: 6
Zunnun is on a distinguished road
Default

Same for me - leaks!
Zunnun is offline   Reply With Quote
Old 01-15-2009, 05:02 PM   #7 (permalink)
New Member
 
Join Date: Jan 2009
Posts: 1
imho is on a distinguished road
Default

This problem had been reported in the Apple Mailing before. Seems like the only way is to use the synchronous methods.

A similar problem exists if you open CFWriteStream or CFReadSteam asynchronously. It will sometimes leak 3.5KB. The funny thing is, it doesn't leak all the time. I suspect it has nothing to do with the networking part of the SDK. Something in the SDK's asynchronous handling messed up...
imho is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CFNetwork sendDidReceiveDataCallback autorelease "leak" bonehead iPhone SDK Development 3 06-04-2008 01:45 PM


» Advertisements
» Online Users: 326
5 members and 321 guests
blueorb, guusleijsten, Kryckter, LEARN2MAKE, SLIC
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,649
Threads: 94,113
Posts: 402,880
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Anwerbl
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:54 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0