From: Kahrl Date: Mon, 20 Oct 2014 14:11:00 +0000 (+0200) Subject: Fix memory leak caused by mesh nodes (and nodeboxes) X-Git-Tag: 0.4.11~225 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ae375cc322c5ee090c21ff4a04e54ef4422020cc;p=oweals%2Fminetest.git Fix memory leak caused by mesh nodes (and nodeboxes) --- diff --git a/src/nodedef.cpp b/src/nodedef.cpp index 5735ef914..ee5505236 100644 --- a/src/nodedef.cpp +++ b/src/nodedef.cpp @@ -171,6 +171,12 @@ ContentFeatures::ContentFeatures() ContentFeatures::~ContentFeatures() { +#ifndef SERVER + for (u32 i = 0; i < 24; i++) { + if (mesh_ptr[i]) + mesh_ptr[i]->drop(); + } +#endif } void ContentFeatures::reset()