summaryrefslogtreecommitdiff
path: root/Zend/zend_opcode.c
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2002-01-25 12:55:03 +0000
committerAndi Gutmans <andi@php.net>2002-01-25 12:55:03 +0000
commit7309a6ed21b85771e478d0513dc13dfadceeae16 (patch)
tree19e8d6de785d10b7b820005964cce05e5f4b592a /Zend/zend_opcode.c
parent96a9eba020f956e605d52a2a99e3975c7e9ae0da (diff)
downloadphp-git-7309a6ed21b85771e478d0513dc13dfadceeae16.tar.gz
- First destructor hell fix. There was a situation where an object's
- destructor could be run after its class was already dead. Right now - object destructors is the first thing whic happens during shutdown in - order to prevent this problem. It's very likely that destructors will - cause more grief and we'll have to outline exactly when you should use - them and what kind of logic you're allowed to do inside of them. - This bug was reported by sebastian.
Diffstat (limited to 'Zend/zend_opcode.c')
-rw-r--r--Zend/zend_opcode.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c
index d79e0f7b22..85e5904b11 100644
--- a/Zend/zend_opcode.c
+++ b/Zend/zend_opcode.c
@@ -111,21 +111,21 @@ ZEND_API void destroy_zend_class(zend_class_entry *ce)
}
switch (ce->type) {
case ZEND_USER_CLASS:
+ zend_hash_destroy(&ce->default_properties);
+ zend_hash_destroy(ce->static_members);
efree(ce->name);
efree(ce->refcount);
zend_hash_destroy(&ce->function_table);
- zend_hash_destroy(&ce->default_properties);
- zend_hash_destroy(ce->static_members);
- efree(ce->static_members);
+ FREE_HASHTABLE(ce->static_members);
zend_hash_destroy(&ce->constants_table);
zend_hash_destroy(&ce->class_table);
break;
case ZEND_INTERNAL_CLASS:
+ zend_hash_destroy(&ce->default_properties);
+ zend_hash_destroy(ce->static_members);
free(ce->name);
free(ce->refcount);
zend_hash_destroy(&ce->function_table);
- zend_hash_destroy(&ce->default_properties);
- zend_hash_destroy(ce->static_members);
free(ce->static_members);
zend_hash_destroy(&ce->constants_table);
zend_hash_destroy(&ce->class_table);