Re: Will sleep/wake notification handles close themselves at process termination?
Re: Will sleep/wake notification handles close themselves at process termination?
- Subject: Re: Will sleep/wake notification handles close themselves at process termination?
- From: Soren Spies <email@hidden>
- Date: Mon, 22 Nov 2010 20:54:01 -0800
On Nov 22, 2010, at 20:18, Julian Hsiao wrote: I'm writing a very simple program that processes sleep/wake notifications based on the sample codes in QA1340, and I'm wondering if I don't call IODeregisterForSystemPower(), IOServiceClose(), and IONotificationPortDestroy() before exiting, will I leak kernel resources? And if clean up is not optional, is there a way to "name" the handles so that if my program terminated abnormally, I can still clean up the leaks afterward?
I'm pretty sure abnormal exit of your program will cause the resources pointed to by these handle to be cleaned up. The resources are primarily user client objects (visible in IO Registry Explorer) so you should be able to see them getting cleaned up when your program exits.
-Soren IO Team
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden