Fixed some memory leaks

This commit is contained in:
viktorljung
2016-02-22 17:47:30 +01:00
parent abd36c81f8
commit 127edb4e60
4 changed files with 29 additions and 7 deletions
+2 -2
View File
@@ -125,7 +125,7 @@ struct ModelJob : RenderJob
if (Skeleton != nullptr) {
EntityWrapper entityWrapper = EntityWrapper(world, modelComponent.EntityID);
BlendTree = new ::BlendTree(entityWrapper, Skeleton);
BlendTree = std::shared_ptr<::BlendTree>(new ::BlendTree(entityWrapper, Skeleton));
}
}
};
@@ -149,7 +149,7 @@ struct ModelJob : RenderJob
std::vector<::Skeleton::AnimationData> Animations;
::Skeleton::AnimationOffset AnimationOffset;
::BlendTree* BlendTree = nullptr;
std::shared_ptr<::BlendTree> BlendTree = nullptr;
glm::vec4 DiffuseColor;
glm::vec4 SpecularColor;