[gegl/soc-2013-opecl-ops] operation: Stop leaking operation class references.
- From: Carlos Zubieta <czubieta src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl/soc-2013-opecl-ops] operation: Stop leaking operation class references.
- Date: Wed, 11 Sep 2013 12:22:13 +0000 (UTC)
commit 0423dd946b85251471365ab9996f4d3314ff42ed
Author: Michael Henning <drawoc darkrefraction com>
Date: Wed Aug 7 17:13:47 2013 -0400
operation: Stop leaking operation class references.
gegl/operation/gegl-operations.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/gegl/operation/gegl-operations.c b/gegl/operation/gegl-operations.c
index 410dbda..531fddb 100644
--- a/gegl/operation/gegl-operations.c
+++ b/gegl/operation/gegl-operations.c
@@ -71,7 +71,6 @@ add_operations (GType parent)
GType *types;
guint count;
guint no;
- G_LOCK_DEFINE_STATIC (type_class_peek_and_ref);
types = g_type_children (parent, &count);
if (!types)
@@ -79,12 +78,11 @@ add_operations (GType parent)
for (no = 0; no < count; no++)
{
- G_LOCK (type_class_peek_and_ref);
-
- if (!g_type_class_peek (types[no]))
- g_type_class_ref (types[no]);
-
- G_UNLOCK (type_class_peek_and_ref);
+ /*
+ * Poke the operation so it registers its name with
+ * gegl_operation_class_register_name
+ */
+ g_type_class_unref (g_type_class_ref (types[no]));
add_operations (types[no]);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]