Selaa lähdekoodia

Remove reference to generators on cursor destruction

Andreas Braun 6 vuotta sitten
vanhempi
commit
9f0683621b
1 muutettua tiedostoa jossa 5 lisäystä ja 0 poistoa
  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