aboutsummaryrefslogtreecommitdiff
path: root/pd/src/g_array.c
diff options
context:
space:
mode:
authorGuenter Geiger <ggeiger@users.sourceforge.net>2003-05-09 16:04:00 +0000
committerGuenter Geiger <ggeiger@users.sourceforge.net>2003-05-09 16:04:00 +0000
commit9c0e19a3be2288db79e2502e5fa450c3e20a668d (patch)
treeca97ce615e037a533304fc4660dcf372ca3b9cd6 /pd/src/g_array.c
parentef50dd62804d54af7da18d8bd8413c0dccd729b8 (diff)
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
Diffstat (limited to 'pd/src/g_array.c')
-rw-r--r--pd/src/g_array.c9
1 files changed, 9 insertions, 0 deletions
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);
}