summaryrefslogtreecommitdiff
path: root/gdk/x11/gdkimage-x11.c
diff options
context:
space:
mode:
authorTim Janik <timj@gtk.org>2001-06-23 20:26:10 +0000
committerTim Janik <timj@src.gnome.org>2001-06-23 20:26:10 +0000
commit92e87e40a7525cd84579865bf7404a84bde93115 (patch)
tree073f4c5ff9824f8a7d7448d736f6c27ef2a147d5 /gdk/x11/gdkimage-x11.c
parentb09d194d3c527d12e8ebcb9d2bcad57a5848ca16 (diff)
downloadgtk+-92e87e40a7525cd84579865bf7404a84bde93115.tar.gz
disabled g_free (image) calls, as GdkImage is an object. these should be
Sat Jun 23 22:03:20 2001 Tim Janik <timj@gtk.org> * gdk/x11/gdkimage-x11.c (gdk_image_init): disabled g_free (image) calls, as GdkImage is an object. these should be g_obejct_unref() instead but that won't work because of the g_error() statement in gdk_x11_image_destroy(). so for now, i did s/g_free/LEAK_IMAGE/ to spot these places.
Diffstat (limited to 'gdk/x11/gdkimage-x11.c')
-rw-r--r--gdk/x11/gdkimage-x11.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/gdk/x11/gdkimage-x11.c b/gdk/x11/gdkimage-x11.c
index eb116f7488..008b515bc7 100644
--- a/gdk/x11/gdkimage-x11.c
+++ b/gdk/x11/gdkimage-x11.c
@@ -55,13 +55,15 @@
static GList *image_list = NULL;
static gpointer parent_class = NULL;
-static void gdk_x11_image_destroy (GdkImage *image);
-static void gdk_image_init (GdkImage *image);
-static void gdk_image_class_init (GdkImageClass *klass);
-static void gdk_image_finalize (GObject *object);
+static void gdk_x11_image_destroy (GdkImage *image);
+static void gdk_image_init (GdkImage *image);
+static void gdk_image_class_init (GdkImageClass *klass);
+static void gdk_image_finalize (GObject *object);
#define PRIVATE_DATA(image) ((GdkImagePrivateX11 *) GDK_IMAGE (image)->windowing_data)
+#define LEAK_IMAGE(image) /* FIXME!! this should be g_object_unref */
+
GType
gdk_image_get_type (void)
{
@@ -94,7 +96,6 @@ static void
gdk_image_init (GdkImage *image)
{
image->windowing_data = g_new0 (GdkImagePrivateX11, 1);
-
}
static void
@@ -249,7 +250,7 @@ gdk_image_new (GdkImageType type,
{
g_warning ("XShmCreateImage failed");
- g_free (image);
+ LEAK_IMAGE (image);
gdk_use_xshm = False;
return NULL;
}
@@ -273,7 +274,7 @@ gdk_image_new (GdkImageType type,
XDestroyImage (private->ximage);
g_free (private->x_shm_info);
- g_free (image);
+ LEAK_IMAGE (image);
return NULL;
}
@@ -290,7 +291,7 @@ gdk_image_new (GdkImageType type,
shmctl (x_shm_info->shmid, IPC_RMID, 0);
g_free (private->x_shm_info);
- g_free (image);
+ LEAK_IMAGE (image);
/* Failure in shmat is almost certainly permanent. Most likely error is
* EMFILE, which would mean that we've exceeded the per-process
@@ -314,7 +315,7 @@ gdk_image_new (GdkImageType type,
shmctl (x_shm_info->shmid, IPC_RMID, 0);
g_free (private->x_shm_info);
- g_free (image);
+ LEAK_IMAGE (image);
gdk_use_xshm = False;
@@ -334,12 +335,12 @@ gdk_image_new (GdkImageType type,
}
else
{
- g_free (image);
+ LEAK_IMAGE (image);
return NULL;
}
break;
#else /* USE_SHM */
- g_free (image);
+ LEAK_IMAGE (image);
return NULL;
#endif /* USE_SHM */
case GDK_IMAGE_NORMAL: