Pārlūkot izejas kodu

Remove reference to generators on cursor destruction

Andreas Braun 6 gadi atpakaļ
vecāks
revīzija
9f0683621b
1 mainītis faili ar 5 papildinājumiem un 0 dzēšanām
  1. 5 0
      lib/Alcaeus/MongoDbAdapter/AbstractCursor.php

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

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