[PD-dev] [ pure-data-Patches-1502860 ] class-destructor (free-method) not called when quitting pd
SourceForge.net
noreply at sourceforge.net
Wed Aug 2 18:20:35 CEST 2006
Patches item #1502860, was opened at 2006-06-08 12:33
Message generated for change (Comment added) made by xovo
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1502860&group_id=55736
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: puredata-dev
Group: bugfix
Status: Open
Resolution: None
Priority: 7
Submitted By: IOhannes m zmölnig (zmoelnig)
Assigned to: Miller Puckette (millerpuckette)
Summary: class-destructor (free-method) not called when quitting pd
Initial Comment:
when an object is destroyed (either directly deleted or
by closing the patch containing it) the "free" method
(a "destructor" in c++-speak) for this object is called.
however, when pd is "quit" (e.g. "Ctrl-Q"), this
destructor does not get called, which potentially
leaves the system in a bad state.
the attached patch fixes this by adding a
"glob_closeall()" function to g_editor.c (which closes
all root canvases) and calling it from within
glob_quit() in s_inter.c
----------------------------------------------------------------------
Comment By: Thomas Grill (xovo)
Date: 2006-08-02 16:20
Message:
Logged In: YES
user_id=350252
I think there's a problem in this patch when traversing the canvas list with
canvases vanishing meanwhile. It should be more like:
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;
}
}
Still, this assumes that PD doesn't do more than removing that one entry from
the canvas list, which is not very clean.
----------------------------------------------------------------------
Comment By: IOhannes m zmölnig (zmoelnig)
Date: 2006-07-26 09:43
Message:
Logged In: YES
user_id=564396
actually i think this is rather important when objects
interface with the system - so i raised the priority
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1502860&group_id=55736
More information about the Pd-dev
mailing list