From: Mikko Rasa Date: Tue, 30 Sep 2014 17:14:28 +0000 (+0300) Subject: Don't leak AsyncUpdaters if Mesh async loading is aborted X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=fcd9e657d0c86cfa4c5bb951ccad2ff5f242863a;p=libs%2Fgl.git Don't leak AsyncUpdaters if Mesh async loading is aborted --- diff --git a/source/mesh.cpp b/source/mesh.cpp index 055345fa..3e9e118a 100644 --- a/source/mesh.cpp +++ b/source/mesh.cpp @@ -283,6 +283,8 @@ Mesh::AsyncLoader::AsyncLoader(Mesh &m, IO::Seekable &i): Mesh::AsyncLoader::~AsyncLoader() { mesh.disallow_rendering = false; + delete vertex_updater; + delete index_updater; } bool Mesh::AsyncLoader::needs_sync() const @@ -315,7 +317,9 @@ bool Mesh::AsyncLoader::process() else if(phase==3) { delete vertex_updater; + vertex_updater = 0; delete index_updater; + index_updater = 0; } ++phase;