Signals and Slots in D

Lionello Lunesu lio at lunesu.remove.com
Mon Oct 2 00:57:40 PDT 2006


Sean Kelly wrote:
> Thomas Kuehne wrote:
>>
>> No. The trick is that this area is collected(and updated by a moving
>> GC), but isn't considered while looking for pointers into the "normal"
>> area.
> 
> I made some experimental changes to add a per-block "scan through" bit 
> to the DMD GC to indicate whether a memory block may contain pointers or 
> not.  It works quite well, but granularity is per block, so if you had 
> something like this:
> 
> class C {
>     C strong;
>     C weak;
> }
> 
> There is no way to tell the GC to simply ignore the weak reference--it's 
> all or nothing.
> 
> 
> Sean

Cool, I'm interested in a patch! What are you using by the way, 
sizeof<4? Or something smarter? Even a simple sizeof would suffice for 
me; at least it'll prevent the GC scanning strings and such.

L.



More information about the Digitalmars-d mailing list