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-04-2008, 09:04 AM   #3 (permalink)
jeff_lamarche
New Member
 
Join Date: Apr 2008
Posts: 420
jeff_lamarche is an unknown quantity at this point
Send a message via AIM to jeff_lamarche Send a message via Yahoo to jeff_lamarche
Default Re: CFNetwork sendDidReceiveDataCallback autorelease "leak"

I would report it as a bug, but as a workaround, have you tried wrapping the calls that generate this in their own autorelease pool? Though it shouldn't be necessary - callbacks should be happening on the main thread (the thread from which they are called) unless documented otherwise, and the main thread always has an autorelease pool.

Or, are you perhaps, setting the callback from within a thread? In that case, the callback will probably function on that thread, and if your thread method has ended and released its autorelease pool, then that would explain the problem. You can fix that problem by calling a method on the main thread to set the callback.

But if you're doing everything in the main thread, then I'd definitely file it as a bug, and try wrapping the calls to like this as a workaround:

Code:
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
...code that generates leak message
[pool release];
__________________
Check out my iPhone Dev Blog
You can send me e-mail at my forum username at mac dot com.
jeff_lamarche is offline   Reply With Quote
 

» Advertisements
» Online Users: 463
19 members and 444 guests
7twenty7, buggen, ClerurcifeDer, Clouds, Duncan C, e2applets, iAppDeveloper, ipodphone, KarlJay, linkmx, orninn, 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:43 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.