From 5f41bccb39cac77ed3bdd7c9bc1e0aca4973c4a9 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 30 Aug 2012 09:12:18 +0000 Subject: [PATCH] fix physics module unload leaks SVN revision: 75856 --- src/modules/physics/e_mod_physics.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/modules/physics/e_mod_physics.c b/src/modules/physics/e_mod_physics.c index b620abfe4..7b737eb98 100644 --- a/src/modules/physics/e_mod_physics.c +++ b/src/modules/physics/e_mod_physics.c @@ -29,7 +29,7 @@ struct _E_Physics_Win { EINA_INLIST; - E_Physics *p; // parent compositor + E_Physics *p; // parent physics Ecore_X_Window win; // raw window - for menus etc. E_Border *bd; // if its a border - later E_Popup *pop; // if its a popup - later @@ -838,12 +838,21 @@ static void _e_mod_physics_del(E_Physics *p) { E_Physics_Win *pw; + Eina_Inlist *l; + E_Physics_Shelf *eps; while (p->wins) { pw = (E_Physics_Win *)(p->wins); _e_mod_physics_win_del(pw); } + if (p->world) + ephysics_world_del(p->world); + EINA_INLIST_FOREACH_SAFE(p->shelves, l, eps) + { + if (eps->body) ephysics_body_del(eps->body); + free(eps); + } free(p); }