Commit fe3c2be3 authored by Ivica Bukvic's avatar Ivica Bukvic
Browse files

implemented free() calls as part of the pd_quit() call from the following...

implemented free() calls as part of the pd_quit() call from the following sourceforge bugtracker: http://sourceforge.net/tracker/index.php?func=detail&aid=1502860&group_id=55736&atid=478072
parent d4aedb67
......@@ -3346,6 +3346,19 @@ static t_glist *glist_finddirty(t_glist *x)
return (0);
}
void canvas_menuclose(t_canvas *x, t_floatarg fforce);
/* properly close all open root canvases */
void glob_closeall(void*dummy, t_floatarg fforce)
{
t_canvas*x, *y;
for (x = canvas_list; x; )
{
y=x->gl_next;
canvas_menuclose(x, fforce); /* forced closing of this root canvas */
x=y;
}
}
/* quit, after calling glist_finddirty() on all toplevels and verifying
the user really wants to discard changes */
void glob_verifyquit(void *dummy, t_floatarg f)
......@@ -3579,6 +3592,9 @@ static void canvas_find_parent(t_canvas *x)
{
if (x->gl_owner)
canvas_vis(glist_getcanvas(x->gl_owner), 1);
else {
sys_gui("menu_raise_console;\n");
}
}
static int glist_dofinderror(t_glist *gl, void *error_object)
......
......@@ -1311,8 +1311,9 @@ void sys_bail(int n)
else _exit(1);
}
extern t_pd *garray_arraytemplatecanvas;
extern t_pd *garray_floattemplatecanvas;
//extern t_pd *garray_arraytemplatecanvas;
//extern t_pd *garray_floattemplatecanvas;
extern void glob_closeall(void *dummy, t_floatarg fforce);
void glob_quit(void *dummy)
{
......@@ -1323,6 +1324,7 @@ void glob_quit(void *dummy)
//let's try to cleanly remove invisible template canvases
//if (garray_arraytemplatecanvas) canvas_free( (t_canvas *)garray_arraytemplatecanvas);
//if (garray_floattemplatecanvas) canvas_free( (t_canvas *)garray_floattemplatecanvas);
glob_closeall(0, 1);
sys_vgui("exit\n");
if (!sys_nogui)
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment