Enlightenment CVS committal Author : doursse Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/lib Modified Files: ewl_grid.h ewl_grid.c Log Message: mem leak-- =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_grid.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -3 -r1.9 -r1.10 --- ewl_grid.h 17 Feb 2006 02:19:26 -0000 1.9 +++ ewl_grid.h 27 Feb 2006 19:51:35 -0000 1.10 @@ -100,6 +100,8 @@ void ewl_grid_child_show_cb(Ewl_Container *p, Ewl_Widget *c); void ewl_grid_child_resize_cb(Ewl_Container *p, Ewl_Widget *child, int size, Ewl_Orientation o); +void ewl_grid_child_destroy_cb(Ewl_Widget *w, void *ev_data, + void *user_data); /** * @} =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_grid.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -3 -r1.14 -r1.15 --- ewl_grid.c 17 Feb 2006 02:19:26 -0000 1.14 +++ ewl_grid.c 27 Feb 2006 19:51:35 -0000 1.15 @@ -312,6 +312,8 @@ /* store the child info in the child widget */ ewl_widget_data_set(w, (void *) g, child); ewl_container_child_append(EWL_CONTAINER(g), w); + ewl_callback_prepend(EWL_WIDGET(w), EWL_CALLBACK_DESTROY, + ewl_grid_child_destroy_cb, g); DLEAVE_FUNCTION(DLEVEL_STABLE); } @@ -531,6 +533,23 @@ DLEAVE_FUNCTION(DLEVEL_STABLE); } +void +ewl_grid_child_destroy_cb(Ewl_Widget *w, void *ev_data __UNUSED__, + void *user_data) +{ + Ewl_Widget *child; + + DENTER_FUNCTION(DLEVEL_STABLE); + DCHECK_PARAM_PTR("w", w); + DCHECK_TYPE("w", w, EWL_WIDGET_TYPE); + + child = (Ewl_Widget *)ewl_widget_data_get(w, user_data); + + IF_FREE(child) + + DLEAVE_FUNCTION(DLEVEL_STABLE); +} + static void ewl_grid_resize(Ewl_Grid *g) { ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs