On Jan 6, 2007, at 6:44 PM, Theodore H. Smith wrote:
From: Frank Condello <[EMAIL PROTECTED]>
Date: Sat, 6 Jan 2007 15:16:19 -0500
On 6-Jan-07, at 9:55 AM, Theodore H. Smith wrote:
To be honest, I can't remember another situation except for trees
where I actually needed weak refs. Well maybe a double-linked
list... but my tree is essentially a double linked list with a bit
ontop.
A self-cleaning file cache is another a useful case.
This is true.
I believe a more general case would be "Caching".
I think it would make sense for caching in general, for when it
gets destroyed, to remove itself from the cache :)
However, I think a "weak ref" isn't really going to do all that
extra work in removing something from a cache. It's usually more
than just a reference inside a property somewhere... they are
usally stored in an array or a double linked list in the first
place meaning that list node itself needs to be removed.
Not necessarily. You can, for instance, leave things in place and do
cleanup later if needed -- just like most garbage collection schemes.
Charles Yeomans
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>