> Also tango (for D 1.0) implements it. > Link: > http://www.dsource.org/projects/tango/docs/current/tango.core.WeakRef.html > > Might be worth a look if you are going to implement it for D 2.0. >
I looked at the D1 implementation. It depends on GC methods weakPointerCreate and weakPointerDestroy. These functions are implemented in D1 GC as extern C functions. It seems most of this code should be directly portable to D2, it would certainly require changes in the DMD2 source code. I have never worked at that level and have used D2 only for past couple of months. While I can give that a blind try, it would be useful only if it gets excepted in DMD2. What do you guys suggest? Regards - Cherry