• 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: NSURLConnection retaining delegate?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSURLConnection retaining delegate?


  • Subject: Re: NSURLConnection retaining delegate?
  • From: Alexander Spohr <email@hidden>
  • Date: Wed, 25 Nov 2009 21:53:59 +0100

Shame on me!
I meant NSURLConnection.
Andy, sorry that I bothered you with the wrong test.
This is one example where copy-paste is better than fresh typing...

So the (corrected) question still stands:
is NSURLConnection retaining its delegate?

	atze



Am 25.11.2009 um 21:19 schrieb Andy Lee:

> On Wednesday, November 25, 2009, at 12:15PM, "Alexander Spohr" <email@hidden> wrote:
>> is NSConnection retaining its delegate?
>> (At least as long as it is collecting data)
>
> FWIW I've never used NSConnection, but in the following quick and dirty code it did not retain the delegate I gave it.
>
> 	TestDelegate * aTestDelegate = [[[TestDelegate alloc] init] autorelease];
> 	NSConnection * aConn = [[NSConnection alloc] initWithReceivePort:nil sendPort:nil];
> 	[aConn setDelegate:aTestDelegate];
>
> The TestDelegate object got dealloced despite being the NSConnection's delegate.
>
>>
>> I thought contract is that a delegate is never retained?
>
> I think there is at least one class that breaks the rule about not retaining delegates (and is documented accordingly).  I forget which it is and I don't have time to search for it, but it doesn't seem to be NSConnection.
>
> --Andy
>

_______________________________________________

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: NSURLConnection retaining delegate?
      • From: Jerry Krinock <email@hidden>
References: 
 >Re: NSConnection retaining delegate? (From: Andy Lee <email@hidden>)

  • Prev by Date: Re: NSConnection retaining delegate?
  • Next by Date: Re: NSOutlineView - How to hide disclosure triangle for root nodes ?
  • Previous by thread: Re: NSConnection retaining delegate?
  • Next by thread: Re: NSURLConnection retaining delegate?
  • Index(es):
    • Date
    • Thread