Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: +[NSBundle bundleWithPath:] avoiding the cache?



On Oct 30, 2004, at 6:32 PM, M. Uli Kusterer wrote:

At 16:05 Uhr -0400 28.10.2004, Jim Correia wrote:
Is there a way to tell NSBundle that it should invalidate the cache for a certain entry (or no longer cache it?)

If I get a bundle back from +[NSBundle bundleWithPath:] and then that bundle is replaced in the filesystem, next time I do +[NSBundle bundleWithPath:] I get backed the cached instance with stale values in the info dictionary.

I don't think Cocoa code can be unloaded from an application, which would imply that Cocoa couldn't unload the old bundle to load the new one, and would thus mean the cache is a Good Thing(tm).

I'm using NSBundle to query the Info.plist dictionary of other bundles. No code is every loaded, so nothing has to be unloaded. As things stand, I get the wrong answer after the original is replaced.

Jim

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >+[NSBundle bundleWithPath:] avoiding the cache? (From: Jim Correia <email@hidden>)
 >Re: +[NSBundle bundleWithPath:] avoiding the cache? (From: "M. Uli Kusterer" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.