evolution-sharp r161 - in trunk: . evolution/src glue/cal



Author: jjohnny
Date: Mon Feb 25 18:48:31 2008
New Revision: 161
URL: http://svn.gnome.org/viewvc/evolution-sharp?rev=161&view=rev

Log:
Fix for 509536 : Leak in CalUtil.ICalToCalComponentArray
--This line, and th se below, will be ignored--

M    evolution/src/CalComponent.cs
M    ChangeLog
M    glue/cal/e-cal-glue-comp.c


Modified:
   trunk/ChangeLog
   trunk/evolution/src/CalComponent.cs
   trunk/glue/cal/e-cal-glue-comp.c

Modified: trunk/evolution/src/CalComponent.cs
==============================================================================
--- trunk/evolution/src/CalComponent.cs	(original)
+++ trunk/evolution/src/CalComponent.cs	Mon Feb 25 18:48:31 2008
@@ -209,12 +209,13 @@
 			static extern void e_cal_component_get_summary (IntPtr raw, ref CalComponentText text);
 		[DllImport("ecal")]
 			static extern void e_cal_component_set_summary (IntPtr raw, ref CalComponentText text);
+		[DllImport("evolutionglue")]
+		        static extern string e_cal_glue_cal_component_get_summary (IntPtr comp);
 
 		public string Summary {
 			get {
-				CalComponentText text = new CalComponentText();
-				e_cal_component_get_summary (Handle, ref text);
-				return text.value;
+			        string temp = e_cal_glue_cal_component_get_summary (handle);
+				return temp;
 			}
 			set {
 				CalComponentText text = new CalComponentText (value,"");
@@ -575,6 +576,12 @@
 			if (error != IntPtr.Zero)
 				throw new GLib.GException( error );
 		}
+	    [DllImport("evolutionglue")]
+		static extern void e_cal_glue_free_cal_component (IntPtr handle);
+	    ~CalComponent()
+	    {
+		e_cal_glue_free_cal_component (handle);
+	    }
+
 	}
 }
-

Modified: trunk/glue/cal/e-cal-glue-comp.c
==============================================================================
--- trunk/glue/cal/e-cal-glue-comp.c	(original)
+++ trunk/glue/cal/e-cal-glue-comp.c	Mon Feb 25 18:48:31 2008
@@ -166,3 +166,16 @@
    g_slist_free (list);
 }
 
+void
+e_cal_glue_free_cal_component (ECalComponent *comp)
+{
+  g_object_unref (comp);
+}
+
+char*
+e_cal_glue_cal_component_get_summary (ECalComponent *comp)
+{
+        ECalComponentText *summary = g_new0 (ECalComponentText, 1);
+	e_cal_component_get_summary (comp, summary);
+	return g_strdup (summary->value);
+}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]