Signals and Slots in D

Walter Bright newshound at digitalmars.com
Fri Sep 29 10:12:07 PDT 2006


Miles wrote:
> Walter Bright wrote:
>> The problem in general with hiding pointers is that it'll break with a
>> moving garbage collector. You could work around this by 'pinning' the
>> objects, but pinning objects long term is a bad idea.
> 
> Am I the only one who is screaming "OMG! What a hack!" while reading
> this thread?
> 
> Sincerely, my impression of D dropped 2 points after reading the
> proposed solutions on this thread.

Yes, it is a hack, and an awful one. I think Frits and Thomas have it 
right in suggesting support for a 'weak pointer' that the GC updates for 
moves, but doesn't scan for roots.



More information about the Digitalmars-d mailing list