Re: [ZEND-ENGINE-CVS] cvs: Zend / zend.c zend.h zend_config.nw.h

From: Date: Sat, 04 Jan 2003 08:08:36 +0000
Subject: Re: [ZEND-ENGINE-CVS] cvs: Zend / zend.c zend.h zend_config.nw.h
References: 1  Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-749@lists.php.net to get a copy of this message
At 02:59 PM 1/2/2003 +0000, Anantha Kesari H Y wrote:
Index: Zend/zend.c diff -u Zend/zend.c:1.167 Zend/zend.c:1.168 --- Zend/zend.c:1.167 Tue Dec 31 10:55:00 2002 +++ Zend/zend.c Thu Jan 2 09:59:11 2003 @@ -618,6 +618,24 @@ #ifndef ZTS
        zend_shutdown_constants();
#endif +#ifdef NETWARE
+       /* All the below lines added to remove memory leaks!
+       * They all add up to a big no. Wondering how come it is missed in the original code!
+       */
+       /* Removes a leak of 160 bytes */
+       destroy_zend_class(&zend_standard_class_def);   /* Destroys the hash tables also */
+       /* Removes a leak of 56 bytes */
+       zend_hash_destroy(&EG(persistent_list));
+       /* Removes a leak of 20,440 bytes */
+       zend_hash_destroy(EG(zend_constants));
+       /* Removes a leak of 56 bytes */
+       free(EG(zend_constants));
+       /* Removes a leak of 20,440 bytes */
+       zend_hash_destroy(GLOBAL_CONSTANTS_TABLE);
+       /* Removes a leak of 56 bytes */
+       free(GLOBAL_CONSTANTS_TABLE);
+       /* Removes a leak of 496 bytes */
+#endif /* NetWare */ }
This should not be needed. It seems that your code for some reason doesn't call zend_shutdown(). Please revert your patch and try and find the cause for this problem. Thanks, Andi

« previous php.zend-engine.cvs (#749) next »