Explorar el Código

Remove reference to generators on cursor destruction

Andreas Braun hace 6 años
padre
commit
9f0683621b
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  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