From: Loïc Blot Date: Wed, 5 Apr 2017 10:30:52 +0000 (+0200) Subject: Memleak fix: LocalPlayer object was not deleted X-Git-Tag: 0.4.16~321 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=54ffc4e915fcdb6f6e7556bc2d1f8b27fd567d9f;p=oweals%2Fminetest.git Memleak fix: LocalPlayer object was not deleted Delete LocalPlayer when ClientEnvironment (object owner) is destroyed --- diff --git a/src/clientenvironment.cpp b/src/clientenvironment.cpp index 29ecd2dfe..94c8e0dcb 100644 --- a/src/clientenvironment.cpp +++ b/src/clientenvironment.cpp @@ -66,6 +66,8 @@ ClientEnvironment::~ClientEnvironment() // Drop/delete map m_map->drop(); + + delete m_local_player; } Map & ClientEnvironment::getMap()