Number of references to a Class Object

Jonathan M Davis jmdavisProg at gmx.com
Sat Feb 12 07:52:07 PST 2011


On Saturday 12 February 2011 07:44:05 d coder wrote:
> > Also tango (for D 1.0) implements it.
> > Link:
> > http://www.dsource.org/projects/tango/docs/current/tango.core.WeakRef.htm
> > l
> > 
> > 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?

If it's Tango code, don't port it. That would cause licensing issues.

If you know roughly what to do and want to take a stab at producing a viable 
patch to fix the problem, then feel free. If it's solid, it may get in. I don't 
know. It doesn't hurt to try though (as long as you're prepared for the fact 
that it may not be accepted).

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list