# Class Entry memleak..

- Thread: https://externals.io/message/3159
- Original archive: https://news-web.php.net/php.internals/3159
- Started by l0t3k on 2003-07-01T03:44:52+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #3159 — l0t3k — 2003-07-01T03:44:52+00:00

URL: https://externals.io/message/3159#3159

i have a ZE2 OO extension which declares class constants as follows :

<code>
void
register_class_long_constant_ex(zend_class_entry * ce, char *key,
        uint key_len, long lval)
{
 zval           *tmp;
 MAKE_STD_ZVAL(tmp);
 ZVAL_LONG(tmp, lval);
 zend_hash_update(&(ce)->constants_table, key, key_len, (void *) &tmp,
      sizeof(zval *), NULL);
}
</code>

for some reason the memory allocated here by MAKE_STD_ZVL is not reclaimed
at process termination. i get the same problem in cgi as well as cli mode.
any ideas of why cleanup isnt happening properly ?

l0t3k

---

## #3160 — l0t3k — 2003-07-02T05:42:01+00:00

URL: https://externals.io/message/3159#3160 · In reply to: #3159

i dont know why this is just showing up (i sent it at least a day ago), but
Moriyoshi has already identified the issue and possible solution. See the
thread "Registering constants to internal classes (ZE2)"

l0t3k
