[Tickets #6837] Re: Singletons and references
bugs at horde.org
bugs at horde.org
Thu Jun 5 08:24:43 UTC 2008
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/6837
-----------------------------------------------------------------------
Ticket | 6837
Updated By | Michael Slusarz <slusarz at horde.org>
Summary | Singletons and references
Queue | Horde Framework Packages
Version | HEAD
Type | Bug
State | Assigned
Priority | 1. Low
Milestone |
Patch |
Owners | Thomas Jarosch
-----------------------------------------------------------------------
Michael Slusarz <slusarz at horde.org> (2008-06-05 04:24) wrote:
> PHP 5.2.x currently doesn't handle cleanup of cyclic references. PHP
> 5.3.x should be fixed, but it doesn't work properly. I filed an
> upstream bug: http://bugs.php.net/?id=45178
Your upstream bug contains an incorrect statement:
The supplied code is the standard way Horde does it singletons. We always
used the syntax of "$object = &new class" to make it work with PHP4 and
PHP5.
As Chuck mentioned, the code you provided in that bug report is most
definitely *not* the "standard" syntax we use. If that syntax does appear
anywhere, it is an error and needs to be fixed (thus this bug report).
Regardless of whether PHP is leaking memory or not, this needs to be
cleaned up regardless if just because semantically it is incorrect.
More information about the bugs
mailing list