Is there any plans to make working signals in D?

Robert jfanatiker at gmx.at
Sun Apr 14 12:29:07 PDT 2013


> IMHO if a object still is connected to a active signal it should not be
> collected. So the place where the signal stores the handler should be
> scanned by the GC as usual. Then just document clearly that you have to
> remove a handler to make sure that garbage collection can really kick
> in.

If you really want this behaviour, all you need is an array of
delegates. But in my experience you don't usually want that, because
you would have to take care of dropping any connections by hand, which
is even more cumbersome than manual memory management in some regards.

Best regards,
Robert



More information about the Digitalmars-d mailing list