signal slots library

Bastiaan Veelo Bastiaan at Veelo.net
Thu Oct 12 13:11:38 PDT 2006


Hi Lutger,

I once had a project like that, it was a fun exercise.
http://svn.dsource.org/projects/dcouple/
http://svn.dsource.org/projects/dcouple/trunk/managed/doc/index.html
http://www.uwesalomon.de/code/indigo/files/core/cmdtarget-d.html#Signals_and_slots
I wish some of the new language features were available back then. My 
aim was mainly to get a nice API or syntax for signals and slots, since 
that was a concern in some of the threads in the newsgroup.

I only had a quick look at your documentation, but could not find the 
answer to an important question:

What happens to an object that is only referenced through connections 
between signals and slots, so no ordinary delegates or pointers? Does it 
get collected by the garbage collector, and is it cleanly disconnected 
when it does?

The answer for my implementation is no, unfortunately, but Uwe Salomon 
got it right. 
http://www.uwesalomon.de/code/indigo/files/core/cmdtarget-d.html#Signals_and_slots

I also think that there should be a Signals and Slots implementation in 
the "standard" library, but it should be one that is invisible to the 
garbage collector, and works well with it!

Bastiaan.



More information about the Digitalmars-d-announce mailing list