• 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: NSMachPort vs. NSMessagePort
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSMachPort vs. NSMessagePort


  • Subject: Re: NSMachPort vs. NSMessagePort
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Fri, 1 Jun 2007 12:05:45 +0700


On 31 May 2007, at 10:38, Chris Kane wrote:

If you're going to use one, use NSMachPort. There is no advantage to NSMessagePort.

[...]

Chris Kane
Cocoa Frameworks, Apple

Thank you very much.
I tried to follow the example "Connecting With NSMachPort" in "Multithreading Programming Topics" but found some problems:


1. in +(void)LaunchThreadWithPort:(id)inData there is a line [distantPort release] which I had to remove - otherwise the program would crash.

2. In - (void)sendCheckinMessage:(NSPort*)outPort I had to add [messageObj autorelease] at the end - otherwise the program would leak.

3. in - (void)launchThread there is a comment: "Let the worker release the port" - this does not make sense: the port has never been allocated or copied, so why should anybody release it?

I tried the link at the bottom of the page (It’s good, but: Report typos, inaccuracies, and so forth) but Safari informed me that I am not connected to the internet.
No big surprise: at home I just have no internet connection.


Gerriet.

P.S. My documentation was last updated in November 2006. So my apologies if this has already been fixed.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


  • Prev by Date: SIGTRAP in NSURLConnection
  • Next by Date: Re: char Array to NSString to cString?
  • Previous by thread: Re: SIGTRAP in NSURLConnection
  • Next by thread: Spell service bundled in application
  • Index(es):
    • Date
    • Thread