From 9c0e19a3be2288db79e2502e5fa450c3e20a668d Mon Sep 17 00:00:00 2001 From: Guenter Geiger Date: Fri, 9 May 2003 16:04:00 +0000 Subject: This commit was generated by cvs2svn to compensate for changes in r610, which included commits to RCS files with non-trunk default branches. svn path=/trunk/; revision=611 --- pd/src/g_array.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'pd/src/g_array.c') diff --git a/pd/src/g_array.c b/pd/src/g_array.c index 7a9fb3f7..2c2dfa8b 100644 --- a/pd/src/g_array.c +++ b/pd/src/g_array.c @@ -81,11 +81,20 @@ void array_resize(t_array *x, t_template *template, int n) } } +void word_free(t_word *wp, t_template *template); + void array_free(t_array *x) { + int i; + t_template *scalartemplate = template_findbyname(x->a_templatesym); /* we don't unset our gpointer here since it was never "set." */ /* gpointer_unset(&x->a_gp); */ gstub_cutoff(x->a_stub); + for (i = 0; i < x->a_n; i++) + { + t_word *wp = (t_word *)(x->a_vec + x->a_elemsize * i); + word_free(wp, scalartemplate); + } freebytes(x->a_vec, x->a_elemsize * x->a_n); freebytes(x, sizeof *x); } -- cgit v1.2.1