Created based on user report.
The constructor of FGameplayEffectCustomExecutionParameters generates a FActiveGameplayEffectHandle that gets put in GlobalActiveGameplayEffectHandles::Map and stays there until that map is reset either via UAbilitySystemGlobals::OnPreBeginPIE() in PIE or UAbilitySystemGlobals::HandlePreLoadMap() in standalone.
This results in unnecessary memory usage which can turn out a problem in games with many Executions and/or games that stay on one map forever. At first inspection a <Handle, ASC weak ptr> pair in the map only takes up 16 bytes so the memory footprint of unnecessary handles in the map is low even after a million GameplayEffect Executions.
But persistent storage of the handle may not be needed and it would be nice of GE execs don't inflate memory consumption. Creating this issue to remember to investigate.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-193714 in the post.
|Aug 23, 2023
|Aug 24, 2023