RE: clean AudioServerDriver plugin unload
RE: clean AudioServerDriver plugin unload
- Subject: RE: clean AudioServerDriver plugin unload
- From: Bertrand Van Kempen <email@hidden>
- Date: Tue, 07 Jan 2014 15:03:54 +0100
- Thread-topic: clean AudioServerDriver plugin unload
Hi Jeff,
Hum, it is an interesting point of view which implies that the process knows that all its sub modules don't need to save their settings at clean up time or doing special tasks e.g mute physical output (I suppose that you assume that this task should be done by a driver (kext))
Anyway, my plugin saves its settings each times they are changed so it could die at any time.
Bertrand
-----Original Message-----
From: coreaudio-api-bounces+bvankempen=email@hidden [mailto:coreaudio-api-bounces+bvankempen=email@hidden] On Behalf Of Jeff Moore
Sent: Monday, January 06, 2014 7:21 PM
To: Core Audio Mailing List
Subject: Re: clean AudioServerDriver plugin unload
In general, it is a bad practice to do clean up work when a process is about to die. The only thing it accomplishes is to prevent the process from exiting quickly.
The reason why is that the kernel reclaims all the resources the process was using once the process has been torn down. So there is generally no point in freeing memory or closing connections, etc. The kernel will handle that as part of reclaiming the process’s resources.
This is why coreaudiod doesn’t do anything special when it is unloaded. It just dies as quickly as it can. The most obvious place this shows up is at reboot time. Any time coreaudiod spends spinning around waiting for the driver to clean itself up at process exit slows down the whole rebooting procedure.
—
Jeff Moore
Core Audio
Apple
On Jan 6, 2014, at 6:36 AM, Bertrand Van Kempen <email@hidden> wrote:
> Hello Jeff,
>
> Happy New Years 2014!
>
> To check if my plugin hasn't memory leaks, I would like to unload it in a cleaner way than kill coreaudiod.
>
> I noticed that the plugin is not destroyed properly when coreaudiod is killed; the plugin just disapear.
>
> In that way, the plugin cannot properly destroy all its objects and stop the kext associated.
>
> Is there absolutely no way to ask coreaudiod to exit properly?
>
> How OSX does at shutdown?
>
>
>
> Best regards,
>
> Bertrand
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden