Skip to content

Commit b7954b9

Browse files
committed
fix: memory overflow
1 parent b3d84cf commit b7954b9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/QueryList.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,15 @@ public static function config()
104104
* Destruction of resources
105105
*/
106106
public function destruct()
107+
{
108+
unset($this->query);
109+
unset($this->kernel);
110+
}
111+
112+
/**
113+
* Destroy all documents
114+
*/
115+
public static function destructDocuments()
107116
{
108117
phpQuery::$documents = [];
109118
}

0 commit comments

Comments
 (0)