Re: Releasing an NSBundle
Re: Releasing an NSBundle
- Subject: Re: Releasing an NSBundle
- From: Douglas Davidson <email@hidden>
- Date: Mon, 21 Dec 2009 10:12:55 -0800
On Dec 21, 2009, at 10:06 AM, Dave DeLong wrote:
My question is this (and the documentation, from what I've seen, is
mute on the subject): when an NSBundle object is deallocated, is
its associated code automatically unloaded, or does it stay loaded
in the runtime?
For compatibility reasons, there are a number of cases in which
NSBundle objects will continue to be retained by the system even when
you have released all of your references to them, so you may not see
your bundles deallocated, but in any event what I would recommend is
that if you have loaded an NSBundle and wish to continue to use the
code from it, you should keep a reference to the NSBundle for as long
as you continue to use it. This is definitely the case for code
loaded using CFBundle--if you want to continue using it, keep a
reference to the CFBundle.
Douglas Davidson
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden