utRemoveVCProcess: Fix memory leak
authorTuro Lamminen <turotl@gmail.com>
Thu, 5 Oct 2017 08:55:58 +0000 (11:55 +0300)
committerTuro Lamminen <turotl@gmail.com>
Thu, 5 Oct 2017 09:15:28 +0000 (12:15 +0300)
test/unit/utRemoveVCProcess.cpp

index c78e80d..6caa72c 100644 (file)
@@ -70,7 +70,7 @@ TEST_F( utRevmoveVCProcess, issue1266_ProcessMeshTest_NoCrash ) {
     mesh->mNumVertices = 1;
     mesh->mColors[ 0 ] = new aiColor4D[ 2 ];
     scene->mMeshes[ 0 ] = mesh;
-    RemoveVCProcess *process = new RemoveVCProcess;
+    std::unique_ptr<RemoveVCProcess> process(new RemoveVCProcess);
     process->Execute( scene );
     delete scene;
 }