RE: [PHP-DEV] MINIT or RINIT
| From: | Sam Liddicott | Date: | Tue, 23 Apr 2002 14:50:15 +0000 |
| Subject: | RE: [PHP-DEV] MINIT or RINIT | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-83212@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Rasmus Lerdorf [mailto:rasmus@lerdorf.ca]
> Sent: 23 April 2002 11:30
> To: Sam Liddicott
> Cc: PHP Developers Mailing List
> Subject: Re: [PHP-DEV] MINIT or RINIT
>
>
> Well, where are you storing them? Make sure they are not in
> memory that
> gets cleaned on a per-request basis. ie. do your own
> malloc() in MINIT
> and free() in MSHUTDOWN.
This means my class must be declared as ZEND_INTERNAL_CLASS then?
Are there any other side effects to doing this?
Must I un-register my classes during shutdown? It seems zend does that for
me.
I've made these changes, to use ZEND_INTERNAL_CLASS and malloc and strdup
instead of emalloc and estrdup but now zend hangs on shutdown.
It seems to come round (under gdb) somewhere in _efree, under
zend_hash_destroy under destroy_zend_class
So it sounds like something I did wrong...
Sam