浏览代码

Remove reference to generators on cursor destruction

Andreas Braun 6 年之前
父节点
当前提交
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