summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Boles <dboles.src@gmail.com>2019-11-18 11:22:34 +0000
committerDaniel Boles <danielboles@equiomgroup.co.uk>2019-11-18 11:26:56 +0000
commit9682c4d79c200408d18336a84f3312f19738baf1 (patch)
tree08f83638318e86cd09cea51cc9f16809f2a3ff55
parent471c47084f1156701fa07dd9b251506e93b2beb1 (diff)
downloadglibmm-9682c4d79c200408d18336a84f3312f19738baf1.tar.gz
Binding: Clarify need to hold ref, poss empty objs
and move the documentation on lifetime away from bind_property_value() up to the class description/intro. https://gitlab.gnome.org/GNOME/glibmm/issues/62
-rw-r--r--glib/src/binding.hg15
1 files changed, 7 insertions, 8 deletions
diff --git a/glib/src/binding.hg b/glib/src/binding.hg
index c6849e17..f88e254e 100644
--- a/glib/src/binding.hg
+++ b/glib/src/binding.hg
@@ -90,10 +90,13 @@ namespace Glib
* various ways of blocking a signal emission, like Glib::SignalProxyNormal::emission_stop()
* or g_signal_handler_block().
*
- * A binding will be severed, and the resources it allocates freed, whenever
- * either one of the Glib::ObjectBase instances it refers to is deleted,
- * when unbind() is called, or when the Glib::Binding instance loses
- * its last reference.
+ * The binding between properties is broken, and its resources freed, when the
+ * Glib::Binding loses its last Glib::RefPtr, the source or target object is
+ * deleted, or unbind() is called. If a Glib::RefPtr to the Glib::Binding
+ * remains after the binding is broken another way, Glib::Binding::get_source()
+ * and Glib::Binding::get_target() return an empty Glib::RefPtr. So, you must
+ * keep a Glib::RefPtr to the Glib::Binding for as long as you want it to bind,
+ * but doing that does not guarantee the source/target are still alive or bound.
*
* @newin{2,44}
*/
@@ -148,10 +151,6 @@ 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.
- *
* A Glib::ObjectBase instance can have multiple bindings.
*
* If you supply transformation functions, it is usually easier to use one of the