Просмотр исходного кода

Remove reference to generators on cursor destruction

Andreas Braun 6 лет назад
Родитель
Сommit
9f0683621b
1 измененных файлов с 5 добавлено и 0 удалено
  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