Hello, there is a memory leak when calling SetAnimation(). The stack is like this.
0x00007ffaf76a0783 UE4Editor-Core.dll!FWindowsPlatformStackWalk::CaptureStackBackTrace() [...\Engine\Source\Runtime\Core\Private\Windows\WindowsPlatformStackWalk.cpp:364]
0x00007ffaf722fa42 UE4Editor-Core.dll!FMallocLeakDetection::Malloc() [...\Engine\Source\Runtime\Core\Private\HAL\MallocLeakDetection.cpp:466]
0x00007ffaf7232e55 UE4Editor-Core.dll!FMallocLeakDetection::Realloc() [...\Engine\Source\Runtime\Core\Private\HAL\MallocLeakDetection.cpp:538]
0x00007ffaf7233324 UE4Editor-Core.dll!FMallocLeakDetectionProxy::Realloc() [...\Engine\Source\Runtime\Core\Private\HAL\MallocLeakDetectionProxy.h:55]
0x00007ffaf723376d UE4Editor-Core.dll!FMemory::Realloc() [...\Engine\Source\Runtime\Core\Public\HAL\FMemory.inl:56]
0x00007ffabfd2f901 UE4Editor-SpinePlugin.dll!spine::Vector<float>::setSize() [...\SpinePlugin\Source\SpinePlugin\Public\spine-cpp\include\spine\Vector.h:82]
0x00007ffabfcf571d UE4Editor-SpinePlugin.dll!spine::CurveTimeline::CurveTimeline() [...\SpinePlugin\Source\SpinePlugin\Public\spine-cpp\src\spine\CurveTimeline.cpp:45]
0x00007ffabfcf717c UE4Editor-SpinePlugin.dll!spine::RotateTimeline::RotateTimeline() [...\SpinePlugin\Source\SpinePlugin\Public\spine-cpp\src\spine\RotateTimeline.cpp:48]
0x00007ffabfd238e4 UE4Editor-SpinePlugin.dll!spine::SkeletonBinary::readAnimation() [...\SpinePlugin\Source\SpinePlugin\Public\spine-cpp\src\spine\SkeletonBinary.cpp:978]
0x00007ffabfd2af06 UE4Editor-SpinePlugin.dll!spine::SkeletonBinary::readSkeletonData() [...\SpinePlugin\Source\SpinePlugin\Public\spine-cpp\src\spine\SkeletonBinary.cpp:333]
0x00007ffabfd011cb UE4Editor-SpinePlugin.dll!USpineSkeletonDataAsset::GetSkeletonData() [...\SpinePlugin\Source\SpinePlugin\Private\SpineSkeletonDataAsset.cpp:298]
0x00007ffabfcfd196 UE4Editor-SpinePlugin.dll!USpineSkeletonAnimationComponent::CheckState() [...\SpinePlugin\Source\SpinePlugin\Private\SpineSkeletonAnimationComponent.cpp:138]
0x00007ffabfd07206 UE4Editor-SpinePlugin.dll!USpineSkeletonAnimationComponent::SetAnimation() [...\SpinePlugin\Source\SpinePlugin\Private\SpineSkeletonAnimationComponent.cpp:213]
In our project we spawn an actor with random spine resource every time the player enters a specific map. SetAnimation() is called in BeginPlay() of the actor. If I keep switching between this map and other maps, this problem occurs.
I tried spawning actor with single spine resource, not random one of many resources, and I haven't reproduced the memory leak in this condition so far.
Does anyone know probable causes or solutions to the leak?