Re: [ZEND-ENGINE-CVS] cvs: TSRM / TSRM.c
| From: | Marcus Boerger | Date: | Sun, 14 Dec 2003 15:38:46 +0000 |
| Subject: | Re: [ZEND-ENGINE-CVS] cvs: TSRM / TSRM.c | ||
| References: | 1 | Groups: | php.zend-engine.cvs |
| Request: | Send a blank email to php-zend-engine-cvs+get-2113@lists.php.net to get a copy of this message | ||
Hello Zeev,
the patch was wrongly applied, we are doing the free loop twice now.
When removing the second (the doubled) loop it works. This should also
explain Sebastian's problem.
marcus
Sunday, December 14, 2003, 10:36:23 AM, you wrote:
> zeev Sun Dec 14 04:36:23 2003 EDT
> Modified files:
> /TSRM TSRM.c
> Log:
> Fix from Michael Sisolak (destructors weren't always properly called)
> Index: TSRM/TSRM.c
> diff -u TSRM/TSRM.c:1.53 TSRM/TSRM.c:1.54
> --- TSRM/TSRM.c:1.53 Tue Aug 5 16:03:54 2003
> +++ TSRM/TSRM.c Sun Dec 14 04:36:23 2003
> @@ -157,7 +157,12 @@
> int j;
> next_p = p->next;
> - for (j=0; j<id_count; j++) {
> + for (j=0; j<p->count; j++) {
> + if (resource_types_table[j].dtor) {
> + resource_types_table[j].dtor(p->storage[j], &p->storage);
> + }
> + }
> + for (j=0; j<p->count; j++) {
> if (resource_types_table && resource_types_table[j].dtor) {
> resource_types_table[j].dtor(p->storage[j], &p->storage);
> }
--
Best regards,
Marcus mailto:helly@php.net