Ammar Ibrahim wrote:

Excuse me for the silly question. But I'm going to be doing hundreds of requests, and I have GC ON, how do I create these connections and retain
them?

Make an NSArray ivar, which you add the connections to.

This will work under GC or retain/release. GC works because there's a reachable reference to the NSArray, which contains reachable references to the NSURLConnections. R/R works because adding any object to NSArray calls retain() on the object.

If you don't want the NSURLConnections to live indefinitely, you'll have to occasionally cull the dead ones from the NSArray.

  -- GG

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to