Re: Is reference counting necessary for a PHP implementation?
| From: | Andrea Faulds | Date: | Wed, 27 Sep 2017 19:34:05 +0000 |
| Subject: | Re: Is reference counting necessary for a PHP implementation? | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-100789@lists.php.net to get a copy of this message | ||
Hi there,
Sidharth Kshatriya wrote:
In: https://github.com/php/php-langspec/blob/master/spec/04-basic-concepts.md#reclamation-and-automatic-memory-managementIt's __destruct() that is the problem, yes. If “running PHP code that relies on deterministic __destruct()” is what you mean by “a PHP implementation”, then yes, it's necessary. If not, then no. :) -- Andrea Faulds https://ajf.me/Despite the use of the term refcount, conforming implementations are notrequired to use a reference counting-based implementation for automatic memory management. Is this statement correct? If I understand correctly many PHP projects depend on the deterministic firing of__destruct()function to cleanup SQL transactions or connections and so forth.