[libgda] Objects refcount corrections
- From: Vivien Malerba <vivien src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [libgda] Objects refcount corrections
- Date: Mon, 14 Sep 2009 20:23:47 +0000 (UTC)
commit c27b6bd1ce847755c93837fcb6c422b05a129e0c
Author: Vivien Malerba <malerba gnome-db org>
Date: Mon Sep 14 21:42:18 2009 +0200
Objects refcount corrections
libgda-ui/data-entries/common-bin.c | 12 +++++++-----
.../data-entries/gdaui-data-cell-renderer-info.c | 8 +++-----
libgda-ui/gdaui-data-widget-info.c | 1 +
3 files changed, 11 insertions(+), 10 deletions(-)
---
diff --git a/libgda-ui/data-entries/common-bin.c b/libgda-ui/data-entries/common-bin.c
index 69a3004..b92540a 100644
--- a/libgda-ui/data-entries/common-bin.c
+++ b/libgda-ui/data-entries/common-bin.c
@@ -274,12 +274,14 @@ common_bin_adjust_menu (BinMenu *binmenu, gboolean editable, const GValue *value
g_string_append_printf (string, "%s: %s", _("Data size"), size);
g_free (size);
#ifdef HAVE_GIO
- GdaBlob *b2;
+ GdaBlob *blob2;
glong read;
- b2 = gda_blob_copy (blob);
- read = gda_blob_op_read (b2->op, b2, 0, 1024);
- bin = (GdaBinary *) b2;
- ctype = g_content_type_guess (NULL, bin->data, (gsize) bin->binary_length, NULL);
+ blob2 = (GdaBlob*) gda_blob_copy ((gpointer) blob);
+ read = gda_blob_op_read (blob2->op, blob2, 0, 1024);
+ bin = (GdaBinary *) blob2;
+ ctype = g_content_type_guess (NULL, bin->data,
+ (gsize) bin->binary_length, NULL);
+ gda_blob_free ((gpointer) blob2);
#endif
}
else
diff --git a/libgda-ui/data-entries/gdaui-data-cell-renderer-info.c b/libgda-ui/data-entries/gdaui-data-cell-renderer-info.c
index 00277e0..96c7d16 100644
--- a/libgda-ui/data-entries/gdaui-data-cell-renderer-info.c
+++ b/libgda-ui/data-entries/gdaui-data-cell-renderer-info.c
@@ -273,18 +273,16 @@ gdaui_data_cell_renderer_info_set_property (GObject *object,
g_object_unref (cellinfo->priv->store);
cellinfo->priv->store = GDAUI_DATA_STORE(g_value_get_object(value));
- if(cellinfo->priv->store)
+ if (cellinfo->priv->store)
g_object_ref(cellinfo->priv->store);
break;
case PROP_ITER:
if (cellinfo->priv->iter)
g_object_unref(cellinfo->priv->iter);
- cellinfo->priv->iter = GDA_DATA_MODEL_ITER (g_value_get_object(value));
- if( cellinfo->priv->iter)
+ cellinfo->priv->iter = GDA_DATA_MODEL_ITER (g_value_get_object (value));
+ if (cellinfo->priv->iter)
g_object_ref (cellinfo->priv->iter);
-
- g_object_ref (G_OBJECT (cellinfo->priv->iter));
break;
case PROP_GROUP:
cellinfo->priv->group = GDAUI_SET_GROUP (g_value_get_pointer(value));
diff --git a/libgda-ui/gdaui-data-widget-info.c b/libgda-ui/gdaui-data-widget-info.c
index f1e8e49..f13aaf5 100644
--- a/libgda-ui/gdaui-data-widget-info.c
+++ b/libgda-ui/gdaui-data-widget-info.c
@@ -187,6 +187,7 @@ release_iter (GdauiDataWidgetInfo *info)
{
g_signal_handlers_disconnect_by_func (info->priv->iter,
G_CALLBACK (iter_row_changed_cb), info);
+ g_object_unref (info->priv->iter);
info->priv->iter = NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]