Re: [sigc] where is error? reference binding is impossible?
- From: Régis Duchesne <hpreg vmware com>
- To: klaus triendl <triendl kj aon at>
- Cc: libsigc-list gnome org
- Subject: Re: [sigc] where is error? reference binding is impossible?
- Date: Wed, 06 Sep 2006 09:08:24 -0700
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]