Ver código fonte

Fix memleak.

kkulling 7 anos atrás
pai
commit
7e67553311
1 arquivos alterados com 4 adições e 0 exclusões
  1. 4 0
      test/unit/utMaterialSystem.cpp

+ 4 - 0
test/unit/utMaterialSystem.cpp

@@ -134,6 +134,8 @@ TEST_F(MaterialSystemTest, testDefaultMaterialAccess) {
     aiMaterial *mat = aiCreateAndRegisterDefaultMaterial();
     EXPECT_NE(nullptr, mat);
     aiReleaseDefaultMaterial();
+
+    delete mat;
 }
 
 // ------------------------------------------------------------------------------------------------
@@ -144,4 +146,6 @@ TEST_F(MaterialSystemTest, testMaterialNameAccess) {
     aiString name = mat->GetName();
     const int retValue(strncmp(name.C_Str(), AI_DEFAULT_MATERIAL_NAME, name.length));
     EXPECT_EQ(0, retValue );
+
+    delete mat;
 }