Enlightenment CVS committal
Author : dj2
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src/lib
Modified Files:
ewl_box.c ewl_misc.c ewl_text.c ewl_widget.c
Log Message:
- more memory leak fixes
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_box.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -3 -r1.33 -r1.34
--- ewl_box.c 22 Dec 2006 19:24:59 -0000 1.33
+++ ewl_box.c 29 Dec 2006 19:16:38 -0000 1.34
@@ -1059,6 +1059,8 @@
IF_FREE(ewl_box_horizontal);
IF_FREE(ewl_box_vertical);
+ if (ewl_box_spread) ecore_list_destroy(ewl_box_spread);
+
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_misc.c,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -3 -r1.75 -r1.76
--- ewl_misc.c 22 Dec 2006 19:24:59 -0000 1.75
+++ ewl_misc.c 29 Dec 2006 19:16:38 -0000 1.76
@@ -144,11 +144,13 @@
fprintf(stderr, "Could not initialize Ecore Desktop.\n");
goto ERROR;
}
+ ecore_list_prepend(shutdown_queue, ecore_desktop_shutdown);
if (!ecore_string_init()) {
fprintf(stderr, "Could not initialize Ecore Strings.\n");
goto ERROR;
}
+ ecore_list_prepend(shutdown_queue, ecore_string_shutdown);
if (!edje_init()) {
fprintf(stderr, "Could not initialize Edje.\n");
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_text.c,v
retrieving revision 1.147
retrieving revision 1.148
diff -u -3 -r1.147 -r1.148
--- ewl_text.c 22 Dec 2006 19:43:41 -0000 1.147
+++ ewl_text.c 29 Dec 2006 19:16:38 -0000 1.148
@@ -3192,7 +3192,7 @@
}
else
{
- fmt[pos].val = ewl_theme_path_get();
+ fmt[pos].val = (char *)ewl_theme_path_get();
fmt[pos++].free = FALSE;
snprintf(t, 128, "fonts/%s", ctx->font);
@@ -5055,7 +5055,12 @@
}
if (ewl_text_default_context)
- ewl_text_context_release(ewl_text_default_context);
+ {
+ IF_FREE(ewl_text_default_context->font);
+ if (ewl_text_default_context->format)
+ ecore_string_release(ewl_text_default_context->format);
+ FREE(ewl_text_default_context);
+ }
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
@@ -5259,7 +5264,6 @@
/* setup the default context and acquire a ref on it so
* it won't go away */
ewl_text_default_context = tx;
- ewl_text_context_acquire(tx);
DRETURN_PTR(tx, DLEVEL_STABLE);
}
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_widget.c,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -3 -r1.110 -r1.111
--- ewl_widget.c 29 Dec 2006 18:24:59 -0000 1.110
+++ ewl_widget.c 29 Dec 2006 19:16:38 -0000 1.111
@@ -26,6 +26,8 @@
static void ewl_widget_cb_drag_down(Ewl_Widget *w, void *ev_data,
void *user_data);
+static void ewl_widget_name_table_shutdown(void);
+
/**
* @return Returns a newly allocated widget on success, NULL on failure.
* @brief Allocate a new widget.
@@ -138,8 +140,13 @@
DCHECK_TYPE("w", w, EWL_WIDGET_TYPE);
if (!ewl_widget_name_table)
+ {
ewl_widget_name_table = ecore_hash_new(ecore_str_hash,
ecore_str_compare);
+ ecore_hash_set_free_key(ewl_widget_name_table,
+ ECORE_FREE_CB(free));
+ ewl_shutdown_add(ewl_widget_name_table_shutdown);
+ }
t = strdup(name);
ewl_attach_name_set(w, t);
@@ -3248,4 +3255,16 @@
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
+
+static void
+ewl_widget_name_table_shutdown(void)
+{
+ DENTER_FUNCTION(DLEVEL_STABLE);
+
+ if (ewl_widget_name_table)
+ ecore_hash_destroy(ewl_widget_name_table);
+
+ DLEAVE_FUNCTION(DLEVEL_STABLE);
+}
+
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs