fixed memory leak during light recalculation, importing the world saves nc level data and uses blocklight from vanilla world

This commit is contained in:
GameHerobrine 2025-07-20 13:30:49 +03:00
parent a61d4936c5
commit cc3f333660
4 changed files with 15 additions and 4 deletions

View file

@ -7,6 +7,13 @@ class PocketChunkParser{
var $map; //21 * $sectorLength
private $location, $raw = b"", $file;
public function __destruct(){
unset($this->location);
unset($this->raw);
unset($this->file);
unset($this->map);
}
public function loadFile($file){
if(file_exists($file . ".gz")){
$this->raw = gzinflate(file_get_contents($file . ".gz"));