From: Operating system: PHP version: Irrelevant Package: Scripting Engine problem Bug Type: Feature/Change Request Bug description:Weak references for PHP
Description: ------------ PHP should introduce weak references like other languages have for example the Vector class of Actionscript 3, WeakReference class of Java or boost's shared_pointer. This would help PHP CLI programs and other complex PHP scripts. For example, the Doctrine Project implements the Row Data Gateway Design Pattern and therefore use an internal repository (cache of record objects) to guarantee that only one object per table row exists. The cache has no chance to free objects that are no longer in use. So, a free() method is provided that will clean up all relations and remove parts from the repository. But this is no good solution to the problem: freeing will lead to bugs because other code might rely on some of the freed objects but they are no longer intact. Thanks for reading -- Edit bug report at http://bugs.php.net/bug.php?id=52318&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52318&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52318&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52318&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=52318&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52318&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=52318&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=52318&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=52318&r=needscript Try newer version: http://bugs.php.net/fix.php?id=52318&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=52318&r=support Expected behavior: http://bugs.php.net/fix.php?id=52318&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=52318&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=52318&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=52318&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52318&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=52318&r=dst IIS Stability: http://bugs.php.net/fix.php?id=52318&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=52318&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=52318&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=52318&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=52318&r=mysqlcfg