klaus,

> It is better to bind a variable by value because there is no garanty that 
> your bound variable is still valid if it would be bound by reference.

I disagree with this statement: sigc++ provides a guarantee for that: if 
your variable is bound to a slot by ref, _and_ it inherits from 
sigc::trackable, then if the ref becomes invalid, the slot will be 
automatically invalidated.

The conclusion: it is efficient to bind vars by ref, but to guarantee 
that it is safe, your vars should inherit from sigc::trackable.

-- 
hpreg
_______________________________________________
libsigc-list mailing list
libsigc-list@gnome.org
http://mail.gnome.org/mailman/listinfo/libsigc-list

Reply via email to