From 7504a015aa5637449aa2c69a3c11b521ff71225d Mon Sep 17 00:00:00 2001 From: Bojidar Marinov Date: Fri, 16 Dec 2016 14:50:46 +0200 Subject: [PATCH] Fix #7303, Quad node mesh data leak --- scene/3d/quad.cpp | 4 ++++ scene/3d/quad.h | 1 + 2 files changed, 5 insertions(+) diff --git a/scene/3d/quad.cpp b/scene/3d/quad.cpp index 1a7eeef1801..adba4516a6b 100644 --- a/scene/3d/quad.cpp +++ b/scene/3d/quad.cpp @@ -230,3 +230,7 @@ Quad::Quad() { configured=false; } + +Quad::~Quad() { + VisualServer::get_singleton()->free(mesh); +} diff --git a/scene/3d/quad.h b/scene/3d/quad.h index be55b0d1c98..4b419db3b80 100644 --- a/scene/3d/quad.h +++ b/scene/3d/quad.h @@ -71,6 +71,7 @@ public: virtual AABB get_aabb() const; Quad(); + ~Quad(); };