Re: IONotificationPortRef cleanup
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On Jan 10, 2006, at 2:44 PM, Steve Checkoway wrote: --Jim _______________________________________________ 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... On Jan 10, 2006, at 2:35 PM, Chris Sarcone wrote: To be completely clear about this, these leaked ports are not reclaimed when the application exits? Mach will clean them up for you at task termination. However, whenever you don't need the resource, you should do the proper thing to release it. Thank you for the clarification. It seems to me that the example should be changed to simply _exit(2) since the ports will be cleaned up. The problem is that someone will copy the example into a library routine and replace the _exit() with a return. Then they wonder why they leak - since Apple provided the example and it should have managed its resources. This email sent to site_archiver@lists.apple.com
participants (1)
-
Jim Magee