I hadn't considered that the system might retain the bundles (but that makes a lot of sense). Nevertheless, I've decided to reorganize my code a bit to maintain an active retain on the NSBundle objects.
Thanks for the info! Dave On Dec 21, 2009, at 11:12 AM, Douglas Davidson wrote: > > 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 >
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Cocoa-dev mailing list ([email protected]) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
