Re: Cocoa classes and plug-in bundle (dylib) in-memory lifetimes (AU, x64, ObjC)
Re: Cocoa classes and plug-in bundle (dylib) in-memory lifetimes (AU, x64, ObjC)
- Subject: Re: Cocoa classes and plug-in bundle (dylib) in-memory lifetimes (AU, x64, ObjC)
- From: "Angus F. Hewlett" <email@hidden>
- Date: Sat, 09 Apr 2011 19:17:25 +0100
Hi Paul,
Thanks for that - responses inline.
On 09/04/2011 14:12, Paul Davis wrote:
On Sat, Apr 9, 2011 at 8:42 AM, Angus F. Hewlett<email@hidden> wrote:
Hi all,
Apologies for cross-posting - having some difficulty getting a definitive
answer on this one.
Trying to clarify the runtime behaviour of Cocoa-UI-based AU bundles, in
relation to module load& unload, and what the correct behaviour should be.
From the NSBundle reference, you'll find half of your answer:
Indeed, and that's kind of the point where my Google-fu ran out.
------------------
Its not entirely clear if this means that the code is not unloaded
even if the last reference to the bundle is destroyed.
Exactly, and this has (in my view) significant implications, given that
it's not unheard of for a single bundle to have a footprint of 10MB code
and, if you use module lifetime scope to allocate resources, even more
in data; equally, it's common for users to have 100+ plug-in bundles
installed.
But it certain does mean that in Ardour and all the source-code viewable code that we
had to base stuff on, we simply create a new NSBundle with [NSBundle
bundleWithPath] and nothing more. ever. I confess to not even being
sure of the lifetime/scope of the bundle so created.
I see - I feel rather uncomfortable leaving module unload to something
as non-deterministic as garbage collected ref counts, aside from
anything else if unloads do happen & are problematic, the crashes will
begin under almost random circumstances. So it would be nice to know for
definite...
Cheers,
Angus.
_______________________________________________
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