- First try at solving problem with different objects being allocated the

- same id.
This commit is contained in:
Andi Gutmans 2002-07-07 19:34:34 +00:00
parent e5bcd202ce
commit 4271895222

View file

@ -115,12 +115,14 @@ void zend_objects_store_del_ref(zval *zobject TSRMLS_DC)
if (--obj->refcount == 0) {
if (EG(objects_store).object_buckets[handle].valid) {
if(obj->dtor && !EG(objects_store).object_buckets[handle].destructor_called) {
if(!EG(objects_store).object_buckets[handle].destructor_called) {
EG(objects_store).object_buckets[handle].destructor_called = 1;
obj->dtor(obj->object, handle TSRMLS_CC);
if (obj->dtor) {
obj->dtor(obj->object, handle TSRMLS_CC);
}
ZEND_OBJECTS_STORE_ADD_TO_FREE_LIST();
}
}
ZEND_OBJECTS_STORE_ADD_TO_FREE_LIST();
#if ZEND_DEBUG_OBJECTS
fprintf(stderr, "Deallocated object id #%d\n", handle);
#endif