Re: how to detect circular reference caused mem leaks on win32
| From: | Stanislav Malyshev | Date: | Fri, 18 Aug 2000 21:15:04 +0000 |
| Subject: | Re: how to detect circular reference caused mem leaks on win32 | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-29541@lists.php.net to get a copy of this message | ||
SM>> Well, all zvals (with all properties) in the circle are not freed, meaning
SM>> more properties you have for the zval, more you lose. However, loss is not
SM>> so huge (some 80-100 bytes per zval), so unless you have millions of them
Actually, this is wrong. Obviously, how much is in the zval is dependant
on the data zval holds. objects use more memory because of the hash table
they contain. But if you are too worried about this, you could write a
destructor method and call it every time before you do unset on the
variable.
--
Stanislav Malyshev stas@zend.com
+972-3-6139665 ext.106