Description

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.

Steps to Reproduce
  • Apply GameplayEffects with Executions
  • GlobalActiveGameplayEffectHandles::Map growing in number of entries irreversibly until map change

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-193714 in the post.

3
Login to Vote

Backlogged
CreatedAug 23, 2023
UpdatedAug 24, 2023