fix physics module unload leaks

SVN revision: 75856
This commit is contained in:
Mike Blumenkrantz 2012-08-30 09:12:18 +00:00
parent 150de8da36
commit 5f41bccb39
1 changed files with 10 additions and 1 deletions

View File

@ -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);
}