• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Releasing an NSBundle
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Releasing an NSBundle


  • Subject: Re: Releasing an NSBundle
  • From: Dave DeLong <email@hidden>
  • Date: Mon, 21 Dec 2009 14:08:15 -0700

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
>

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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

References: 
 >Releasing an NSBundle (From: Dave DeLong <email@hidden>)
 >Re: Releasing an NSBundle (From: Douglas Davidson <email@hidden>)

  • Prev by Date: Simple question on Menus and Document-based apps
  • Next by Date: Re: Simple question on Menus and Document-based apps
  • Previous by thread: Re: Releasing an NSBundle
  • Next by thread: [A] Resizing a window to show full rows from a table view
  • Index(es):
    • Date
    • Thread