mirror of
https://github.com/allankoechke/raylib-cpp.git
synced 2026-11-30 10:59:00 +00:00
Fixed memory leak from LoadModelAnimations
This commit is contained in:
@@ -39,7 +39,11 @@ class ModelAnimation : public ::ModelAnimation {
|
||||
static std::vector<ModelAnimation> Load(const std::string& fileName) {
|
||||
int count = 0;
|
||||
::ModelAnimation* modelAnimations = ::LoadModelAnimations(fileName.c_str(), &count);
|
||||
return std::vector<ModelAnimation>(modelAnimations, modelAnimations + count);
|
||||
std::vector<ModelAnimation> mats(modelAnimations, modelAnimations + count);
|
||||
|
||||
RL_FREE(modelAnimations);
|
||||
|
||||
return mats;
|
||||
}
|
||||
|
||||
GETTERSETTER(int, BoneCount, boneCount)
|
||||
|
||||
Reference in New Issue
Block a user