Signals and Slots in D

Sean Kelly sean at f4.ca
Mon Oct 2 10:10:47 PDT 2006


Lionello Lunesu wrote:
> 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.
> 
> 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.

Less than (void*).sizeof, which equates to the same thing.  I'll try to 
find the time to get a patch off to Walter.


Sean



More information about the Digitalmars-d mailing list