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(); };