From 48ab804ceec8229e351914ec863202418938d5fa Mon Sep 17 00:00:00 2001 From: Hiroyuki Ikezoe Date: Wed, 31 Aug 2005 08:34:39 +0000 Subject: [PATCH] Plug some memory leaks 2005-08-31 Hiroyuki Ikezoe * shell/ev-pixbuf-cache.c: (dispose_cache_job_info): * shell/ev-window.c: (ev_window_print_range), (ev_window_dispose): Plug some memory leaks --- ChangeLog | 7 +++++++ shell/ev-pixbuf-cache.c | 4 ++++ shell/ev-window.c | 7 +++++++ 3 files changed, 18 insertions(+) diff --git a/ChangeLog b/ChangeLog index 237cc6f5..a23f1a2b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-08-31 Hiroyuki Ikezoe + + * shell/ev-pixbuf-cache.c: (dispose_cache_job_info): + * shell/ev-window.c: (ev_window_print_range), (ev_window_dispose): + + Plug some memory leaks + 2005-08-29 Christian Persch * configure.ac: diff --git a/shell/ev-pixbuf-cache.c b/shell/ev-pixbuf-cache.c index 1b6966d3..b7807248 100644 --- a/shell/ev-pixbuf-cache.c +++ b/shell/ev-pixbuf-cache.c @@ -160,6 +160,10 @@ dispose_cache_job_info (CacheJobInfo *job_info, gdk_region_destroy (job_info->selection_region); job_info->selection_region = NULL; } + if (job_info->rc) { + g_object_unref (G_OBJECT (job_info->rc)); + job_info->rc = NULL; + } job_info->selection_points.x1 = -1; job_info->new_points.x1 = -1; diff --git a/shell/ev-window.c b/shell/ev-window.c index 8ab8da57..be601901 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -1486,6 +1486,8 @@ ev_window_print_range (EvWindow *ev_window, int first_page, int last_page) break; } + g_object_unref (job); + gtk_widget_destroy (print_dialog); if (print_job != NULL) { @@ -2836,6 +2838,11 @@ ev_window_dispose (GObject *object) priv->find_bar = NULL; } + if (priv->uri) { + g_free (priv->uri); + priv->uri = NULL; + } + if (window->priv->fullscreen_timeout_source) { g_source_destroy (window->priv->fullscreen_timeout_source); window->priv->fullscreen_timeout_source = NULL; -- 2.43.5