[gnome-remote-desktop] clipboard: Also clear GMutexes and GConds on destruction
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-remote-desktop] clipboard: Also clear GMutexes and GConds on destruction
- Date: Wed, 24 Nov 2021 18:04:39 +0000 (UTC)
commit 35f747047dc127e4bb26225e3c9d1f54198d529b
Author: Pascal Nowack <Pascal Nowack gmx de>
Date: Thu Nov 18 12:09:28 2021 +0100
clipboard: Also clear GMutexes and GConds on destruction
src/grd-clipboard.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
---
diff --git a/src/grd-clipboard.c b/src/grd-clipboard.c
index 3c121bc..bea5481 100644
--- a/src/grd-clipboard.c
+++ b/src/grd-clipboard.c
@@ -447,6 +447,18 @@ grd_clipboard_dispose (GObject *object)
G_OBJECT_CLASS (grd_clipboard_parent_class)->dispose (object);
}
+static void
+grd_clipboard_finalize (GObject *object)
+{
+ GrdClipboard *clipboard = GRD_CLIPBOARD (object);
+ GrdClipboardPrivate *priv = grd_clipboard_get_instance_private (clipboard);
+
+ g_mutex_clear (&priv->pending_read_mutex);
+ g_cond_clear (&priv->pending_read_cond);
+
+ G_OBJECT_CLASS (grd_clipboard_parent_class)->finalize (object);
+}
+
static void
grd_clipboard_init (GrdClipboard *clipboard)
{
@@ -465,4 +477,5 @@ grd_clipboard_class_init (GrdClipboardClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->dispose = grd_clipboard_dispose;
+ object_class->finalize = grd_clipboard_finalize;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]