[glib] gcancellable: Clarify that GSources hold references to GCancellables
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gcancellable: Clarify that GSources hold references to GCancellables
- Date: Mon, 27 Oct 2014 13:38:21 +0000 (UTC)
commit 203fe3b8a8817da8e1ec771e2ebd15c747653158
Author: Philip Withnall <philip withnall collabora co uk>
Date: Wed Sep 24 14:06:02 2014 +0100
gcancellable: Clarify that GSources hold references to GCancellables
Clarify in the documentation that a GSource created with
g_cancellable_source_new() must be explicitly removed from its
GMainContext before the GCancellable can be finalised.
This could be a common way of leaking GCancellables.
https://bugzilla.gnome.org/show_bug.cgi?id=737259
gio/gcancellable.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gio/gcancellable.c b/gio/gcancellable.c
index 800e8f3..258b88d 100644
--- a/gio/gcancellable.c
+++ b/gio/gcancellable.c
@@ -722,6 +722,8 @@ static GSourceFuncs cancellable_source_funcs =
* For convenience, you can call this with a %NULL #GCancellable,
* in which case the source will never trigger.
*
+ * The new #GSource will hold a reference to the #GCancellable.
+ *
* Returns: (transfer full): the new #GSource.
*
* Since: 2.28
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]