site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Dirk -- if (NULL != portRef) { // we have found valid client port if (CFMessagePortIsValid(portRef)) { success = CFMessagePortSendRequest ( portRef, kMyMessageID, sendDataRef, kSendTimeout, kReceiveTimeout, NULL, NULL); CheckError( success); } CFRelease(portRef); } -- Chris -------- 6 Infinite Loop M/S 306-2MS Cupertino CA 95014 phone: (408) 974-4033 fax: (408) 862-7577 email: sarcone@apple.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... CFMessagePortRef portRef = CFMessagePortCreateRemote( kCFAllocatorDefault, portNameRef); After stepping through this code the number of send rights remain increased. Is there anything wrong with this code? I'm definitely no expert on CFMessagePort (was just trying to lend a helping hand). However, looking at the source code, it appears it will create a remote port regardless of whether you have specified wanting a reply or not. In your case, it appears you don't want to wait for a reply. It looks like CFMessagePortInvalidate() might need to be called after sending the message in order to get the reply port released. I'm not sure if this works as intended or if it's a bug. Looking at the documentation doesn't provide any extra insight either (at least for me). I'd suggest filing a bug with this example and see what those more familiar with CFMessagePort say... This email sent to site_archiver@lists.apple.com
participants (1)
-
Chris Sarcone