[jsonrpc-glib] prefer dispose over finalize
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jsonrpc-glib] prefer dispose over finalize
- Date: Sun, 17 Dec 2017 10:20:38 +0000 (UTC)
commit 2d6b753ba10e1f911886f58b45cc4eec018bf31a
Author: Christian Hergert <chergert redhat com>
Date: Sun Dec 17 02:20:16 2017 -0800
prefer dispose over finalize
src/jsonrpc-client.c | 6 +++---
src/jsonrpc-output-stream.c | 6 +++---
src/jsonrpc-server.c | 6 +++---
3 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/src/jsonrpc-client.c b/src/jsonrpc-client.c
index e758345..a786a57 100644
--- a/src/jsonrpc-client.c
+++ b/src/jsonrpc-client.c
@@ -306,7 +306,7 @@ jsonrpc_client_constructed (GObject *object)
}
static void
-jsonrpc_client_finalize (GObject *object)
+jsonrpc_client_dispose (GObject *object)
{
JsonrpcClient *self = (JsonrpcClient *)object;
JsonrpcClientPrivate *priv = jsonrpc_client_get_instance_private (self);
@@ -318,7 +318,7 @@ jsonrpc_client_finalize (GObject *object)
g_clear_object (&priv->io_stream);
g_clear_object (&priv->read_loop_cancellable);
- G_OBJECT_CLASS (jsonrpc_client_parent_class)->finalize (object);
+ G_OBJECT_CLASS (jsonrpc_client_parent_class)->dispose (object);
}
static void
@@ -370,7 +370,7 @@ jsonrpc_client_class_init (JsonrpcClientClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->constructed = jsonrpc_client_constructed;
- object_class->finalize = jsonrpc_client_finalize;
+ object_class->dispose = jsonrpc_client_dispose;
object_class->get_property = jsonrpc_client_get_property;
object_class->set_property = jsonrpc_client_set_property;
diff --git a/src/jsonrpc-output-stream.c b/src/jsonrpc-output-stream.c
index c1abb13..f48b001 100644
--- a/src/jsonrpc-output-stream.c
+++ b/src/jsonrpc-output-stream.c
@@ -106,7 +106,7 @@ jsonrpc_output_stream_set_property (GObject *object,
}
static void
-jsonrpc_output_stream_finalize (GObject *object)
+jsonrpc_output_stream_dispose (GObject *object)
{
JsonrpcOutputStream *self = (JsonrpcOutputStream *)object;
JsonrpcOutputStreamPrivate *priv = jsonrpc_output_stream_get_instance_private (self);
@@ -114,7 +114,7 @@ jsonrpc_output_stream_finalize (GObject *object)
g_queue_foreach (&priv->queue, (GFunc)g_object_unref, NULL);
g_queue_clear (&priv->queue);
- G_OBJECT_CLASS (jsonrpc_output_stream_parent_class)->finalize (object);
+ G_OBJECT_CLASS (jsonrpc_output_stream_parent_class)->dispose (object);
}
static void
@@ -122,7 +122,7 @@ jsonrpc_output_stream_class_init (JsonrpcOutputStreamClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->finalize = jsonrpc_output_stream_finalize;
+ object_class->dispose = jsonrpc_output_stream_dispose;
object_class->get_property = jsonrpc_output_stream_get_property;
object_class->set_property = jsonrpc_output_stream_set_property;
diff --git a/src/jsonrpc-server.c b/src/jsonrpc-server.c
index 093beab..c91f859 100644
--- a/src/jsonrpc-server.c
+++ b/src/jsonrpc-server.c
@@ -106,7 +106,7 @@ jsonrpc_server_real_handle_call (JsonrpcServer *self,
}
static void
-jsonrpc_server_finalize (GObject *object)
+jsonrpc_server_dispose (GObject *object)
{
JsonrpcServer *self = (JsonrpcServer *)object;
JsonrpcServerPrivate *priv = jsonrpc_server_get_instance_private (self);
@@ -114,7 +114,7 @@ jsonrpc_server_finalize (GObject *object)
g_clear_pointer (&priv->clients, g_hash_table_unref);
g_clear_pointer (&priv->handlers, g_array_unref);
- G_OBJECT_CLASS (jsonrpc_server_parent_class)->finalize (object);
+ G_OBJECT_CLASS (jsonrpc_server_parent_class)->dispose (object);
}
static void
@@ -122,7 +122,7 @@ jsonrpc_server_class_init (JsonrpcServerClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->finalize = jsonrpc_server_finalize;
+ object_class->dispose = jsonrpc_server_dispose;
klass->handle_call = jsonrpc_server_real_handle_call;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]