- all those handlers->add_ref(zobject) would prevent the objects from
authorMichael Wallner <mike@php.net>
Fri, 28 Oct 2005 11:49:13 +0000 (11:49 +0000)
committerMichael Wallner <mike@php.net>
Fri, 28 Oct 2005 11:49:13 +0000 (11:49 +0000)
  being freed when there's no more reference to them

http_request_pool_api.c
http_requestpool_object.c

index 0faf2756c13f5fae199891bfd1eb94e73c9d60f6..188bb9d326aea647f94dd678ea8463ef33c8e973 100644 (file)
@@ -103,7 +103,6 @@ PHP_HTTP_API STATUS _http_request_pool_attach(http_request_pool *pool, zval *req
                                zend_llist_add_element(&pool->bodies, &body);
 
                                ZVAL_ADDREF(request);
-                               Z_OBJ_ADDREF_P(request);
 
 #if HTTP_DEBUG_REQPOOLS
                                fprintf(stderr, "> %d HttpRequests attached to pool %p\n", zend_llist_count(&pool->handles), pool);
@@ -310,7 +309,6 @@ void _http_request_pool_responsehandler(zval **req, CURL *ch TSRMLS_DC)
 #endif
                
                ZVAL_ADDREF(*req);
-               Z_OBJ_ADDREF_PP(req);
                zend_llist_add_element(&obj->pool->finished, req);
                http_request_object_responsehandler(obj, *req);
        }
index 2281f40e9785d627723523b2ca1ae56dadcdd328..9c008a6c406bd3e1ccf56dd84c3567c8a3f4329d 100644 (file)
@@ -148,7 +148,6 @@ void _http_requestpool_object_free(zend_object *object TSRMLS_DC)
 static void _http_requestpool_object_llist2array(zval **req, zval *array TSRMLS_DC)
 {
        ZVAL_ADDREF(*req);
-       Z_OBJ_ADDREF_PP(req);
        add_next_index_zval(array, *req);
 }