Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: WeakCache?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WeakCache?



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.

References: 
 >Re: WeakCache? (From: Marco Scheurer <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.