Weak references. B.B; Keinfarbton

Bjoern nanali at nospam-wanadoo.fr
Wed Apr 23 12:44:06 PDT 2008


Bill Baxter schrieb:
> of weak refs.  In addition to null pointers polluting the table, there's 
> also just the basic overhead of needing to create an extra object for 
> each entry.  Ideally there would be WeakArray, WeakSet, WeakHeap... etc. 
>  I think I've seen such things in some language.  Python maybe?
> 
> --bb

weakHashMap, weakTreeMap ???

implemented in Java.... ? OpenJDK/ GNU Classpath
Well, Frank is looking for a D weakHashMap implementation. Due to the 
fact that I am actually doing plombering, plastering, electric, 
establish tons of cement concrete  ... I am not able to offer a 
solution. (Beeing allready happy that I am  able to write a msg)

Nevertheless I did like to suggest to use Bill B's weakRef!  as  inner 
adaptor class of WeakHashMap.  (pretty much the same as in GNU 
classpath)  as static array of WeakRef objects. Further the dCollection 
: see dSource / collection classes are <IMO> fitting better than Tango 
Collection.


Bjoern



More information about the Digitalmars-d mailing list