cataphract                               Mon, 25 Oct 2010 02:03:20 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=304724

Log:
- Small optimization of the fix of bug #53071. It's not necessary to destroy
  the debug info as it's not holding references anymore (the fix removed
  the refcount increments).

Bug: http://bugs.php.net/53071 (Closed) Use of SPLObjectStorage Defeats 
gc_collect_cycles
      
Changed paths:
    U   php/php-src/branches/PHP_5_3/ext/spl/spl_observer.c
    U   php/php-src/trunk/ext/spl/spl_observer.c

Modified: php/php-src/branches/PHP_5_3/ext/spl/spl_observer.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/spl/spl_observer.c 2010-10-25 01:41:54 UTC 
(rev 304723)
+++ php/php-src/branches/PHP_5_3/ext/spl/spl_observer.c 2010-10-25 02:03:20 UTC 
(rev 304724)
@@ -320,13 +320,6 @@
                zend_hash_clean(Z_ARRVAL_P(gcdata_arr));
        }

-       /* destroy intern->debug_info, as it's holding references to the zvals 
*/
-       if (intern->debug_info != NULL) {
-               zend_hash_destroy(intern->debug_info);
-               efree(intern->debug_info);
-               intern->debug_info = NULL;
-       }
-
        if (gcdata_arr == NULL) {
                MAKE_STD_ZVAL(gcdata_arr);
                array_init(gcdata_arr);

Modified: php/php-src/trunk/ext/spl/spl_observer.c
===================================================================
--- php/php-src/trunk/ext/spl/spl_observer.c    2010-10-25 01:41:54 UTC (rev 
304723)
+++ php/php-src/trunk/ext/spl/spl_observer.c    2010-10-25 02:03:20 UTC (rev 
304724)
@@ -389,13 +389,6 @@
                zend_hash_clean(Z_ARRVAL_P(gcdata_arr));
        }

-       /* destroy intern->debug_info, as it's holding references to the zvals 
*/
-       if (intern->debug_info != NULL) {
-               zend_hash_destroy(intern->debug_info);
-               efree(intern->debug_info);
-               intern->debug_info = NULL;
-       }
-
        if (gcdata_arr == NULL) {
                MAKE_STD_ZVAL(gcdata_arr);
                array_init(gcdata_arr);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to