• 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: 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


  • Follow-Ups:
    • Re: Releasing an NSBundle
      • From: Dave DeLong <email@hidden>
References: 
 >Releasing an NSBundle (From: Dave DeLong <email@hidden>)

  • Prev by Date: Releasing an NSBundle
  • Next by Date: Re: Detecting system protected folders.
  • Previous by thread: Releasing an NSBundle
  • Next by thread: Re: Releasing an NSBundle
  • Index(es):
    • Date
    • Thread