• 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: NSSocketPort question: retainCount
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSSocketPort question: retainCount


  • Subject: Re: NSSocketPort question: retainCount
  • From: Nicko van Someren <email@hidden>
  • Date: Mon, 16 May 2005 18:47:26 +0100

On 16 May 2005, at 18:29, Douglas Davidson wrote:

On May 16, 2005, at 8:04 AM, Fabio Ribeiro wrote:

  Any idea on why the code below (at least on Tiger - I didn't tested on Panther) reports '2' for the retainCount after I've called only once 'init?'?

  After some calls, even calling release, of course I won't be able to open sockets anymore (too many open files for this process) and I'll be with some zoombies running? (one zoombie created per call) I'm not connecting at this time: I'm just creating a NSSocketPort object for test.

You need to invalidate the port when you are done with it.

That's really rather useful to know; I've never seen it mentioned anywhere else. The docs for NSPort talk about you needing to mark ports as invalid when you detect timeouts etc. but as far as I can tell they say nothing of you always needing to invalidate a port before you dispose of it. Can you tell me where this is documented? If not, should I file a bug report against the developer docs?


	Cheers,
		Nicko

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSSocketPort question: retainCount
      • From: Douglas Davidson <email@hidden>
References: 
 >NSSocketPort question: retainCount (From: Fabio Ribeiro <email@hidden>)
 >Re: NSSocketPort question: retainCount (From: Douglas Davidson <email@hidden>)

  • Prev by Date: Re: NSSocketPort question: retainCount
  • Next by Date: Re: How can I update SQLite version within XCode 2.0/Cocoa?
  • Previous by thread: Re: NSSocketPort question: retainCount
  • Next by thread: Re: NSSocketPort question: retainCount
  • Index(es):
    • Date
    • Thread