Re: WeakCache?
Re: WeakCache?
- Subject: Re: WeakCache?
- From: Karl Goiser <email@hidden>
- Date: Fri, 2 May 2003 09:08:10 +1000
Could you arrange for the cache(s) to not retain the objects, and
override the release method in the objects so that, when the count goes
to zero, it would send a notification...
This would disconnect the upwards dependency from the object to the
collection.
Karl
On Friday, May 2, 2003, at 02:24 AM, petite_abeille wrote:
On Thursday, May 1, 2003, Karl Goiser wrote:
You will have to make sure your object won't be referenced by multiple
weak caches at the same time.
Good point. Another issue that came up with querying the default
retainCount implementation is that it turns out to be shockingly slow
:( So I'm back to square 1 for the moment: a nonretainedObjectValue
wrapper plus custom dealloc method to notify the cache.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.