Hello all,
While reorganizing my code a question about memory management in Pd arose
in me. If I allocate memory within the constructor space, do I have to free
this myself? If yes, how or where should I do this?
Example:
typedef struct _myclass {
t_object x_obj;
t_int* x_ptr;
}
Hello IOhannes,
On Mon, Mar 24, 2014 at 2:45 PM, IOhannes m zmölnig zmoel...@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) {
Hello devs,
Inspired by this thread (
http://lists.puredata.info/pipermail/pd-list/2013-05/102885.html) I spent
the weekend doing exercises in writing simple conversions from int to
symbol and vice versa, trying to get more used to the pd api. I ended up
with a library of 8 classes I called