Improved Level object deallocation

This commit is contained in:
Shoghi Cervantes
2014-10-19 20:45:03 +02:00
parent f2b573c32f
commit 2f8267aa1e
6 changed files with 7 additions and 3 deletions

View File

@ -304,6 +304,7 @@ class Level implements ChunkManager, Metadatable{
}
public function close(){
if($this->getAutoSave()){
$this->save();
}
@ -316,6 +317,7 @@ class Level implements ChunkManager, Metadatable{
$this->provider->close();
$this->provider = null;
$this->blockMetadata = null;
$this->blockCache = [];
}
/**