From d15f32b018b83cf4a97df49d054e9e52d00196bf Mon Sep 17 00:00:00 2001 From: gered Date: Sat, 22 Dec 2012 18:16:18 -0500 Subject: [PATCH] clean up chunk data before returning --- src/meshfile.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/meshfile.cpp b/src/meshfile.cpp index e40772c..7ccf83e 100644 --- a/src/meshfile.cpp +++ b/src/meshfile.cpp @@ -269,6 +269,16 @@ BOOL ConvertToMeshFile(const std::string &meshFilename, const Ms3d *source, cons WriteChunk(animations, fp); fclose(fp); + + SAFE_DELETE(vertices); + SAFE_DELETE(normals); + SAFE_DELETE(texCoords); + SAFE_DELETE(triangles); + SAFE_DELETE(groups); + SAFE_DELETE(joints); + SAFE_DELETE(jointToVertices); + SAFE_DELETE(keyframes); + SAFE_DELETE(animations); return TRUE; }