• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSMutableURLRequest weirdness!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSMutableURLRequest weirdness!


  • Subject: Re: NSMutableURLRequest weirdness!
  • From: Ammar Ibrahim <email@hidden>
  • Date: Fri, 5 Jun 2009 02:44:54 +0300

On Fri, Jun 5, 2009 at 2:37 AM, Mike Abdullah <email@hidden>wrote:

>
> On 5 Jun 2009, at 00:10, Ammar Ibrahim wrote:
>
>  On Fri, Jun 5, 2009 at 1:55 AM, Keary Suska <email@hidden
>> >wrote:
>>
>>  On Jun 4, 2009, at 2:11 PM, Ammar Ibrahim wrote:
>>>
>>> Hello, I'm about to bang my head against the wall. Here's the situation,
>>>
>>>> I'm
>>>> trying to send many requests using the same request object, I have a
>>>> method
>>>> which I call frequently, which has  the following piece of code:
>>>>
>>>>
>>> This is not all the relevant code, and is insufficient to help. All I can
>>> say is, are you re-using the same NSURLConnection, just changing the
>>> request? If so, that wouldn't work. NSURLConnection copies the request on
>>> initialization.
>>>
>>
>>
>> Yes, I'm reusing the same NSURLConnection and just changing the request,
>> and
>> I can see a lot of weirdness and messed up calls. What's the right way to
>> do
>> it? And I have my connection object as a class variable. Do I need to
>> retain
>> it?
>>
>
> Changing the request will make no difference to the existing connection. As
> the docs state, the request used to create the connection is copied so it
> cannot be further modified. You should create 1 NSURLConnection per
> operation.
>
>
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?
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSMutableURLRequest weirdness!
      • From: Ammar Ibrahim <email@hidden>
    • Re: NSMutableURLRequest weirdness!
      • From: Shawn Erickson <email@hidden>
References: 
 >NSMutableURLRequest weirdness! (From: Ammar Ibrahim <email@hidden>)
 >Re: NSMutableURLRequest weirdness! (From: Keary Suska <email@hidden>)
 >Re: NSMutableURLRequest weirdness! (From: Ammar Ibrahim <email@hidden>)
 >Re: NSMutableURLRequest weirdness! (From: Mike Abdullah <email@hidden>)

  • Prev by Date: Re: NSMutableURLRequest weirdness!
  • Next by Date: Re: NSMutableURLRequest weirdness!
  • Previous by thread: Re: NSMutableURLRequest weirdness!
  • Next by thread: Re: NSMutableURLRequest weirdness!
  • Index(es):
    • Date
    • Thread