Re: clean AudioServerDriver plugin unload
Re: clean AudioServerDriver plugin unload
- Subject: Re: clean AudioServerDriver plugin unload
- From: Jeff Moore <email@hidden>
- Date: Mon, 06 Jan 2014 10:20:57 -0800
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