WeakRef updated to better support Tango -- and a question
Bill Baxter
dnewsgroup at billbaxter.com
Thu Feb 14 08:19:16 PST 2008
The unittest in the previous version didn't actually work under Tango...
oops. This version also eliminates the string alias and puts imports
for unittests inside version(UnitTest) {...}
Also I realized Myron Alexander had made a weak ref class a while back
called WeakObjectReference, and posted under D.announce. The main
difference seems to be that his version uses malloc to allocate one
pointer, whereas I just use a size_t to hold the pointer so that the GC
won't see it. Is there some reason why that won't cut it?
Still hoping someone will let me add this to scrapple and/or
tango.scrapple. Hint hint.
--bb
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: weakref.d
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20080215/de6f19b6/attachment.ksh>
More information about the Digitalmars-d
mailing list