From b7954b9aef9ab3fb25fb62c3dd3790a711d15e58 Mon Sep 17 00:00:00 2001 From: Jaeger <JaegerCode@gmail.com> Date: Fri, 20 Mar 2020 13:26:40 +0800 Subject: [PATCH] fix: memory overflow --- src/QueryList.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/QueryList.php b/src/QueryList.php index 7946840..7d69e3b 100644 --- a/src/QueryList.php +++ b/src/QueryList.php @@ -104,6 +104,15 @@ public static function config() * Destruction of resources */ public function destruct() + { + unset($this->query); + unset($this->kernel); + } + + /** + * Destroy all documents + */ + public static function destructDocuments() { phpQuery::$documents = []; }