From: Zeev Suraski Date: Sun, 14 Dec 2003 09:36:23 +0000 (+0000) Subject: Fix from Michael Sisolak (destructors weren't always properly called) X-Git-Tag: php-5.0.0b3RC1~81 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3788ddb383d1edc42afbebde25795d598ed92b23;p=php Fix from Michael Sisolak (destructors weren't always properly called) --- 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); }