Enlightenment CVS committal

Author  : doursse
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_label.c ewl_label.h 


Log Message:
mem leak
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_label.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- ewl_label.c 21 Jun 2005 02:15:51 -0000      1.3
+++ ewl_label.c 21 Jul 2005 06:46:00 -0000      1.4
@@ -49,6 +49,7 @@
        ewl_object_fill_policy_set(EWL_OBJECT(la), EWL_FLAG_FILL_FILL);
 
        ewl_callback_append(w, EWL_CALLBACK_REALIZE, ewl_label_realize_cb, 
NULL);
+       ewl_callback_append(w, EWL_CALLBACK_DESTROY, ewl_label_destroy_cb, 
NULL);
 
        ewl_label_text_set(la, text);
 
@@ -101,6 +102,21 @@
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
 
+void
+ewl_label_destroy_cb(Ewl_Widget *w, void *ev, void *data)
+{
+        Ewl_Label *label;
+
+       DENTER_FUNCTION(DLEVEL_STABLE);
+       DCHECK_PARAM_PTR("w", w);
+
+       label = EWL_LABEL(w);
+       if (label->text)
+         free(label->text);
+
+       DLEAVE_FUNCTION(DLEVEL_STABLE);
+}
+
 static void
 ewl_label_apply(Ewl_Label *la)
 {
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_label.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- ewl_label.h 21 Jun 2005 02:15:51 -0000      1.2
+++ ewl_label.h 21 Jul 2005 06:46:00 -0000      1.3
@@ -41,6 +41,7 @@
  * Internally used callbacks
  */
 void ewl_label_realize_cb(Ewl_Widget *w, void *ev, void *data);
+void ewl_label_destroy_cb(Ewl_Widget *w, void *ev, void *data);
 
 /**
  * @}




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to