diff options
author | Michael Catanzaro <mcatanzaro@gnome.org> | 2021-10-27 23:37:22 +0000 |
---|---|---|
committer | Michael Catanzaro <mcatanzaro@gnome.org> | 2021-10-27 23:37:22 +0000 |
commit | 98e0789fea615be6b2baa648a891b607eb7016db (patch) | |
tree | 5da46e7501c17c1baf45fcefb37df6f95584c9c5 /gobject | |
parent | 2f4e911afdbd239a5fcb283b36a7cac199242ee6 (diff) | |
parent | 3b67d5322771544977d0f7c03ce7ad91af946874 (diff) | |
download | glib-98e0789fea615be6b2baa648a891b607eb7016db.tar.gz |
Merge branch 'weak-refs-docs' into 'main'
gobject: Clarify behaviour of adding weak refs during disposal
See merge request GNOME/glib!2255
Diffstat (limited to 'gobject')
-rw-r--r-- | gobject/gobject.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gobject/gobject.c b/gobject/gobject.c index c05de431e..ae89b7462 100644 --- a/gobject/gobject.c +++ b/gobject/gobject.c @@ -4585,11 +4585,14 @@ g_initially_unowned_class_init (GInitiallyUnownedClass *klass) * objects. * * If the object's #GObjectClass.dispose method results in additional - * references to the object being held, any #GWeakRefs taken - * before it was disposed will continue to point to %NULL. If - * #GWeakRefs are taken after the object is disposed and - * re-referenced, they will continue to point to it until its refcount + * references to the object being held (‘re-referencing’), any #GWeakRefs taken + * before it was disposed will continue to point to %NULL. Any #GWeakRefs taken + * during disposal and after re-referencing, or after disposal has returned due + * to the re-referencing, will continue to point to the object until its refcount * goes back to zero, at which point they too will be invalidated. + * + * It is invalid to take a #GWeakRef on an object during #GObjectClass.dispose + * without first having or creating a strong reference to the object. */ /** |