Hello IOhannes,

On Mon, Mar 24, 2014 at 2:45 PM, IOhannes m zmölnig <zmoelnig@iem.at> wrote:

the destructor is called "free_method" in Pd-lingo and is set via
class_new() [1].

so you basically would do:

void myclass_free(t_myclass*x) {
   free(x->x_ptr);
}
// ...
void myclass_setup(void) {
  class_new(gensym("myclass"), myclass_new, myclass_free,
sizeof(t_myclass), 0, ...);
}
 
Thanks! I now see how it works. You indeed mentioned it in the tutorial. Sorry for missing that part.

Regards.
Funs