Fixed entities memory leak

This commit is contained in:
Shoghi Cervantes Pueyo 2013-01-26 21:45:31 +01:00
parent c77a3c2f87
commit 1f8939da6e

View File

@ -224,6 +224,8 @@ class PlayerAPI{
$player->close();
$this->saveOffline($player->username, $player->data);
$this->server->query("DELETE FROM players WHERE name = '".$player->username."';");
unset($player->entity->player);
unset($player->entity);
$this->server->api->entity->remove($player->eid);
unset($player);
}