Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:887 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37408 invoked from network); 13 Apr 2003 12:04:27 -0000 Received: from unknown (HELO mailout09.sul.t-online.com) (194.25.134.84) by pb1.pair.com with SMTP; 13 Apr 2003 12:04:27 -0000 Received: from fwd10.sul.t-online.de by mailout09.sul.t-online.com with smtp id 194gDi-0004Wz-01; Sun, 13 Apr 2003 14:04:26 +0200 Received: from baumbart.post.rwth-aachen.de (520072483730-0001@[80.142.170.69]) by fwd10.sul.t-online.com with esmtp id 194gDZ-1AFShUC; Sun, 13 Apr 2003 14:04:17 +0200 Reply-to:marcus.boerger@post.rwth-aachen.de Message-ID: <5.1.0.14.2.20030413140310.0290e1f0@pop.t-online.de> X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Sun, 13 Apr 2003 14:04:15 +0200 To: "l0t3k" Cc: internals@lists.php.net In-Reply-To: <20030413111449.21612.qmail@pb1.pair.com> References: <20030413071253.29163.qmail@pb1.pair.com> <5.1.0.14.2.20030413123209.02944550@pop.t-online.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Sender: 520072483730-0001@t-dialin.net Subject: Re: [PHP-DEV] zend_class_entry memory leak ? From: marcus.boerger@t-online.de ((Marcus =?iso-8859-1?Q?B=F6rger?=)) At 13:15 13.04.2003, l0t3k wrote: > > You should use internal classes and do everything that needs memory > > with malloc/realoc/free instead of the e functions. The problem is the >shutdown > > sequence. >Marcus, > thanks for responding. im confused about what you mean by internal classes >though. do you have a basic example ? If you use any of the follwoing functions (as you should do): ZEND_API zend_class_entry *zend_register_internal_class(zend_class_entry *class_entry TSRMLS_DC); ZEND_API zend_class_entry *zend_register_internal_class_ex(zend_class_entry *class_entry, zend_class_entry *parent_ce, char *parent_name TSRMLS_DC); ZEND_API zend_class_entry *zend_register_internal_ns_class(zend_class_entry *class_entry, zend_class_entry *parent_ce, zend_namespace *ns, char *ns_name TSRMLS_DC); ZEND_API zend_namespace *zend_register_internal_namespace(zend_namespace *ns TSRMLS_DC); then you can't use any of emallo/erealloc/efree thats all you must know. marcus