From 3788ddb383d1edc42afbebde25795d598ed92b23 Mon Sep 17 00:00:00 2001 From: Zeev Suraski Date: Sun, 14 Dec 2003 09:36:23 +0000 Subject: Fix from Michael Sisolak (destructors weren't always properly called) --- TSRM/TSRM.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'TSRM/TSRM.c') diff --git a/TSRM/TSRM.c b/TSRM/TSRM.c index ebb0acbe8f..a47cfacfad 100644 --- a/TSRM/TSRM.c +++ b/TSRM/TSRM.c @@ -157,7 +157,12 @@ TSRM_API void tsrm_shutdown(void) int j; next_p = p->next; - for (j=0; jcount; j++) { + if (resource_types_table[j].dtor) { + resource_types_table[j].dtor(p->storage[j], &p->storage); + } + } + for (j=0; jcount; j++) { if (resource_types_table && resource_types_table[j].dtor) { resource_types_table[j].dtor(p->storage[j], &p->storage); } -- cgit v1.2.1