Why zend_shutdown_constants not called from executor_globals_dtor?
| From: | Kamesh Jayachandran | Date: | Sat, 11 Sep 2004 11:38:15 +0000 |
| Subject: | Why zend_shutdown_constants not called from executor_globals_dtor? | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-12734@lists.php.net to get a copy of this message | ||
Hi All,
I could see in executor_globals_ctor calling zend_startup_constants
which allocates one hash table.
Later to free this hash table zend_shutdown_constants is called from
zend_shutdown rather than executor_globals_dtor.
This may not cause a memory leak in Non ZTS environment where
zend_shutdown and executor_globals_dtor are called only once and the
current free up by calling zend_shutdown_constants from zend_shutdown
won't cause any memory leak.
In case of ZTS environment every thread calls executor_globals_ctor and
only the main thread causes zend_shutdown and hence only main thread
EG(zend_constants) are freed whereas other threads EG(zend_constants)
are not freed.
Correct me if I am wrong.
With regards
Kamesh Jayachandran