Fix memleak.
parent
9a6b07e522
commit
7e67553311
|
@ -134,6 +134,8 @@ TEST_F(MaterialSystemTest, testDefaultMaterialAccess) {
|
||||||
aiMaterial *mat = aiCreateAndRegisterDefaultMaterial();
|
aiMaterial *mat = aiCreateAndRegisterDefaultMaterial();
|
||||||
EXPECT_NE(nullptr, mat);
|
EXPECT_NE(nullptr, mat);
|
||||||
aiReleaseDefaultMaterial();
|
aiReleaseDefaultMaterial();
|
||||||
|
|
||||||
|
delete mat;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
@ -144,4 +146,6 @@ TEST_F(MaterialSystemTest, testMaterialNameAccess) {
|
||||||
aiString name = mat->GetName();
|
aiString name = mat->GetName();
|
||||||
const int retValue(strncmp(name.C_Str(), AI_DEFAULT_MATERIAL_NAME, name.length));
|
const int retValue(strncmp(name.C_Str(), AI_DEFAULT_MATERIAL_NAME, name.length));
|
||||||
EXPECT_EQ(0, retValue );
|
EXPECT_EQ(0, retValue );
|
||||||
|
|
||||||
|
delete mat;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue