[glibmm/wip/dboles/Binding-Issue#62: 2/3] Binding: Clarify need to hold ref, poss empty objs
- From: Daniel Boles <dboles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm/wip/dboles/Binding-Issue#62: 2/3] Binding: Clarify need to hold ref, poss empty objs
- Date: Fri, 15 Nov 2019 18:33:37 +0000 (UTC)
commit 869167526bf4238f26a605649cec78183b04a1e3
Author: Daniel Boles <dboles src gmail com>
Date: Fri Nov 15 11:08:24 2019 +0000
Binding: Clarify need to hold ref, poss empty objs
https://gitlab.gnome.org/GNOME/glibmm/issues/62
glib/src/binding.hg | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/glib/src/binding.hg b/glib/src/binding.hg
index f944dd8d..1c963f36 100644
--- a/glib/src/binding.hg
+++ b/glib/src/binding.hg
@@ -148,9 +148,13 @@ public:
* will be updated as well. The @a transform_from function is only used in case
* of bidirectional bindings, otherwise it will be ignored.
*
- * The binding will automatically be removed when either the source or the
- * target instance is deleted. To remove the binding without affecting the
- * source and the target you can call unbind() on the returned Binding instance.
+ * The binding between the properties is broken when the Glib::Binding loses
+ * its last Glib::RefPtr, either source/target Glib::ObjectBase is deleted,
+ * or unbind() is called. If a Glib::RefPtr to the Glib::Binding remains
+ * after the binding is broken another way, then get_source() and get_target()
+ * return an empty Glib::RefPtr. So, you must keep a Glib::RefPtr to the
+ * Glib::Binding for as long as you want to bind, but that alone does not
+ * necessarily mean the binding between properties itself is still active.
*
* A Glib::ObjectBase instance can have multiple bindings.
*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]