[evolution-patches] More fixes for the evolution-data-server memory buildup [Calendar]
- From: Harish Krishnaswamy <kharish novell com>
- To: patches <evolution-patches lists ximian com>
- Subject: [evolution-patches] More fixes for the evolution-data-server memory buildup [Calendar]
- Date: Wed, 08 Dec 2004 18:57:26 -0800
hi,
The attached patch provides a few more fixes - basically the EList held
by e-cal-backend.c not getting freed and thereby not letting
edatacalview objects to get freed , holding the ecalbackends .... ( a
classic case of domino effect)
kindly review the same.
thanks,
harish
Index: calendar/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/ChangeLog,v
retrieving revision 1.354
diff -u -3 -p -u -p -r1.354 ChangeLog
--- calendar/ChangeLog 6 Dec 2004 04:09:21 -0000 1.354
+++ calendar/ChangeLog 8 Dec 2004 13:15:48 -0000
@@ -1,3 +1,16 @@
+2004-12-08 Harish Krishnamwamy <kharish novell com>
+ Fixes for various leaks causing memory build-ups in eds.
+
+ * libecal/e-cal.c (e_cal_get_objects_for_uid) :
+ Free the subcomponent.
+ * libecal/e-cal-listener.c (impl_notifyFreeBusy):
+ l->data should be unref'd - not free'd.
+ * libedata-cal/e-cal-backend.c (get_queries):
+ Do not ref the queries while returning them. This is unnecessary.
+ * libedata-cal/e-cal-backend-sexp.c (e_cal_backend_sexp_match_comp) :
+ unref the comp and backend while returning.
+
+
2004-12-06 Harish Krishnaswamy <kharish novell com>
* backends/groupwise/e-cal-backend-groupwise-utils.c
(e_gw_connection_send_appointment) : Add correct view arguments
Index: calendar/libecal/e-cal.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libecal/e-cal.c,v
retrieving revision 1.83
diff -u -3 -p -u -p -r1.83 e-cal.c
--- calendar/libecal/e-cal.c 28 Oct 2004 00:16:21 -0000 1.83
+++ calendar/libecal/e-cal.c 8 Dec 2004 13:15:48 -0000
@@ -2581,7 +2581,7 @@ e_cal_get_objects_for_uid (ECal *ecal, c
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (subcomp));
*objects = g_list_append (*objects, comp);
-
+ icalcomponent_free (subcomp);
subcomp = icalcomponent_get_next_component (icalcomp, kind_to_find);
}
}
@@ -3030,7 +3030,7 @@ static void
generate_instances (ECal *ecal, time_t start, time_t end, const char *uid,
ECalRecurInstanceFn cb, gpointer cb_data)
{
- GList *objects;
+ GList *objects = NULL;
GList *instances, *detached_instances = NULL;
GList *l;
char *query;
Index: calendar/libecal/e-cal-listener.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libecal/e-cal-listener.c,v
retrieving revision 1.10
diff -u -3 -p -u -p -r1.10 e-cal-listener.c
--- calendar/libecal/e-cal-listener.c 5 Oct 2004 11:43:14 -0000 1.10
+++ calendar/libecal/e-cal-listener.c 8 Dec 2004 13:15:48 -0000
@@ -584,7 +584,7 @@ impl_notifyFreeBusy (PortableServer_Serv
g_signal_emit (G_OBJECT (listener), signals[GET_FREE_BUSY], 0, convert_status (status), freebusy);
for (l = freebusy; l; l = l->next)
- g_free (l->data);
+ g_object_unref (G_OBJECT (l->data));
g_list_free (freebusy);
}
Index: calendar/libedata-cal/e-cal-backend.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libedata-cal/e-cal-backend.c,v
retrieving revision 1.8
diff -u -3 -p -u -p -r1.8 e-cal-backend.c
--- calendar/libedata-cal/e-cal-backend.c 11 Jun 2004 15:54:15 -0000 1.8
+++ calendar/libedata-cal/e-cal-backend.c 8 Dec 2004 13:15:48 -0000
@@ -502,7 +502,7 @@ e_cal_backend_get_queries (ECalBackend *
g_return_val_if_fail (backend != NULL, NULL);
g_return_val_if_fail (E_IS_CAL_BACKEND (backend), NULL);
- return g_object_ref (backend->priv->queries);
+ return backend->priv->queries;
}
Index: calendar/libedata-cal/e-cal-backend-sexp.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libedata-cal/e-cal-backend-sexp.c,v
retrieving revision 1.17
diff -u -3 -p -u -p -r1.17 e-cal-backend-sexp.c
--- calendar/libedata-cal/e-cal-backend-sexp.c 27 Aug 2004 18:09:58 -0000 1.17
+++ calendar/libedata-cal/e-cal-backend-sexp.c 8 Dec 2004 13:15:48 -0000
@@ -981,9 +981,11 @@ e_cal_backend_sexp_match_comp (ECalBacke
sexp->priv->search_context->backend = g_object_ref (backend);
/* if it's not a valid vcard why is it in our db? :) */
- if (!sexp->priv->search_context->comp)
+ if (!sexp->priv->search_context->comp) {
+ g_object_unref (sexp->priv->search_context->comp);
+ g_object_unref (sexp->priv->search_context->backend);
return FALSE;
-
+ }
r = e_sexp_eval(sexp->priv->search_sexp);
retval = (r && r->type == ESEXP_RES_BOOL && r->value.bool);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]