Re: WeakCache?
Re: WeakCache?
- Subject: Re: WeakCache?
- From: Marcel Weiher <email@hidden>
- Date: Tue, 29 Apr 2003 13:12:06 +0200
On Monday, April 28, 2003, at 05:43 Uhr, Marco Scheurer wrote:
I see... but if I need to proactively remove an object from a cache
in dealloc, this creates a very unfortunate dependency between the
object and its cache... something I would like to avoid altogether :/
Any idea about how to implement a generic weak cache mechanism which
doesn't depends on any help from the objects it's holding to stay
valid?
What about a cache which retains its objects as usual, but
periodically checks their retain counts and release them when there's
only one reference left?
That is almost exactly how MPWFoundations's oject-cache works.
Marcel
--
Marcel Weiher Metaobject Software Technologies
email@hidden www.metaobject.com
Metaprogramming for the Graphic Arts. HOM, IDEAs, MetaAd etc.
_______________________________________________
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.