• 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: Rendezvous and the Picture Sharing app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Rendezvous and the Picture Sharing app


  • Subject: Re: Rendezvous and the Picture Sharing app
  • From: Chris Parker <email@hidden>
  • Date: Sat, 26 Oct 2002 14:17:30 -0700

On Friday, October 25, 2002, at 08:23 PM, James Moore wrote:

That kind of bothered me as well since Im a newbie and was looking for some rendezvous code. If you want it to stop crashing comment out the line at the bottom of PicSharingController.m that reads:

[incomingConnection release];

It stopped crashing for me after I did that. Can a more experienced person shed light on why it crashes when the NSFileHandle is released after it's been closed?

Mea culpa! I'll see what I can do about getting an updated example out to the ADC or something. :)

This has more to do with -how- that NSFileHandle is created than the fact that it's an NSFileHandle. That particular instance (the incomingConnection object) is handed to the controller as the result of a connection notification. I didn't create it, so I don't get to release it - it's autoreleased. It was created by the underlying NSFileHandle machinery when the connection event came in on the socket, and that machinery created an autoreleased instance.

So:

Did I use alloc/init to create that particular instance? No.
Did it come to me through a convenience constructor? Well, sort of. But I didn't create it, so I don't own it. Therefore I don't get to release it.

Sorry about that, folks. It's been fixed here and I'll contact someone about the example.

.chris

--
Chris Parker
Cocoa Frameworks Engineer
Apple Computer, Inc.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Rendezvous and the Picture Sharing app (From: James Moore <email@hidden>)

  • Prev by Date: Reading SmallSockets
  • Next by Date: Re: cocoa-dev digest, Vol 2 #1437 - 13 msgs
  • Previous by thread: Re: Rendezvous and the Picture Sharing app
  • Next by thread: Progress Indicator problem
  • Index(es):
    • Date
    • Thread