diff --git a/game/debugDraw.cc b/game/debugDraw.cc index 88e9948..2fd354a 100644 --- a/game/debugDraw.cc +++ b/game/debugDraw.cc @@ -60,5 +60,5 @@ void DebugDraw::draw3dText (const btVector3 &location, const char *textString) { } void DebugDraw::clearData() { - this->data = std::vector(); + this->data.clear(); } diff --git a/game/graphics.cc b/game/graphics.cc index e8cb64e..4216bb9 100644 --- a/game/graphics.cc +++ b/game/graphics.cc @@ -491,6 +491,7 @@ void Graphics::render(double time) } debug_ab->setDataElements(data_count/6, debugData); debugDrawer.clearData(); + delete debugData; debugShader->use(); debugShader->setUniform("viewProjectionMatrix", lightingViewProjectionMatrix); debug_vao->render();