ID:               21775
 User updated by:  [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Bogus
 Bug Type:         Reproducible crash
 Operating System: SuSE Linux 7.3
 PHP Version:      4.3.0
 New Comment:

PHP does not reclaim any memory no longer referenced?
No garbage collection?


Previous Comments:
------------------------------------------------------------------------

[2003-01-20 11:12:37] [EMAIL PROTECTED]

PHP is designed to bail out (to stop executing) when the memory has
been
run out. So it's natural that the runtime end up segfaulting.


------------------------------------------------------------------------

[2003-01-20 10:30:58] [EMAIL PROTECTED]

The following code:

<%
   class Object {
      var $prev;
      var $next;
      function unter (&$ref)
      {
         $ref->prev = &$this;
         $this->next = &$ref;
      }
   };

   while (true)
   {
      print "NEW ROUND\n";
      {
         $o = &new Object;
         for ($i = 0; $i < 10000; ++$i) {
            $o->unter (new Object);
            $o = &$o->next;
         }
         unset ($o);
      }
   }
%>

consumes as much memory it can get. I would expect that
PHP garbage-collects the memory.



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=21775&edit=1

Reply via email to