[M3devel] WeakRef mechanism alive and well? cm3-cvshead

Olaf Wagner wagner at elegosoft.com
Tue Mar 11 11:31:03 CET 2008


Quoting Dragiša Durić <dragisha at m3w.org>:

> I have single linked list that I use to send messages to many threads.
> It's end is locked for addition, and current end is given to each new
> client connecting. This way, all client are going towards end of the
> list so it's head becomes unreferenced and goes away by GC.
>
> Except it does not.
>
> I've added WeakRef cleanup and sequential id's so I can record maximum
> freed id for checking. No single cleanup happens.
>
> I'll cross check my code and count my references from application side,
> but maybe someone else has similar problems?

I'm not aware of any recent changes in this area. I could only
assume that the behaviour of the garbage collector may have changed,
as Antony Hosking has done considerable work on that, but I haven't
noticed any general problems. (I think there's still a problem with
generational collection and FreeBSD PTHREADs, but you're not using
that, are you?)

Olaf
-- 
Olaf Wagner -- elego Software Solutions GmbH
                Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23 45 86 96  mobile: +49 177 2345 869  fax: +49 30 23 45 86 95
    http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194




More information about the M3devel mailing list