This leak occurs in Test builds, but not in Development builds.
Updating InstancedStaticMesh with UpdateInstancedTransform every frame causes a memory leak.
This screenshot was taken using Mempro to track StaticMesh's memory. It can see that the leak is increasing. Another screenshot shows the increased diff CallTree. When KeyValueData is allocated, the create MeshDrawCommand appears to remain in the Test build instead of being discarded (Red boxes). In Development build, the command is destroyed by Release().
・\Engine\Source\Runtime\Core\Public\Misc\Build.h
#elif UE_BUILD_TEST //... #ifndef STATS // #define STATS ((USE_MALLOC_PROFILER || FORCE_USE_STATS) && !ENABLE_STATNAMEDEVENTS) #define STATS 1 #endif //... #ifndef NO_LOGGING // #define NO_LOGGING !USE_LOGGING_IN_SHIPPING #define NO_LOGGING 1 #endif
・\Engine\Source\Runtime\Core\Public\HAL\LowLevelMemTracker.h
// #define ENABLE_LOW_LEVEL_MEM_TRACKER (!UE_BUILD_SHIPPING && (!UE_BUILD_TEST || ALLOW_LOW_LEVEL_MEM_TRACKER_IN_TEST) && PLATFORM_SUPPORTS_LLM && WITH_ENGINE && 1)
#define ENABLE_LOW_LEVEL_MEM_TRACKER (!UE_BUILD_SHIPPING && PLATFORM_SUPPORTS_LLM && WITH_ENGINE && 1)
2. Package repro project with a Win64/Test build.
3. Add launch argument "-llm"and launch the application.
4. Execute the console command "stat llmfull".
Then, StaticMesh tag memory keeps increasing.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-95599 in the post.
0 |
Component | UE - Graphics Features |
---|---|
Affects Versions | 4.25 |
Target Fix | 4.25.3 |
Created | Jul 20, 2020 |
---|---|
Resolved | Jul 21, 2020 |
Updated | Apr 28, 2021 |