Browse Source

Remove reference to generators on cursor destruction

Andreas Braun 6 năm trước cách đây
mục cha
commit
9f0683621b

+ 5 - 0
lib/Alcaeus/MongoDbAdapter/AbstractCursor.php

@@ -131,6 +131,11 @@ abstract class AbstractCursor
         }
         }
     }
     }
 
 
+    public function __destruct()
+    {
+        $this->iterator = null;
+    }
+
     /**
     /**
      * Returns the current element
      * Returns the current element
      * @link http://www.php.net/manual/en/mongocursor.current.php
      * @link http://www.php.net/manual/en/mongocursor.current.php