Search Issue Tracker
Won't Fix
Votes
0
Found in
5.1.0b5
Issue ID
694780
Regression
No
AddListener and RemoveListener generate a lot of garbage
How to reproduce:
1. Open attached project
2. Attach script Test.cs to any game object
- The script simply creates and removes listeners
- The code:
public UnityEvent Event;
private UnityAction m_onStartAction;
void Start () { m_onStartAction = OnTestFunc; }
void Update ()
{
Event.AddListener(m_onStartAction);
Event.RemoveListener(m_onStartAction);
}
private void OnTestFunc() {}
3. Play the scene
4. Open the Profiler window
- Note how much garbage is collected for BehaviourUpdate -> Test.Update()
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [Linux][Mono] Crash on mono_exception_walk_trace when entering the Play Mode
- Memory usage rapidly increases when capturing a GameObject with a Line Renderer Component using Texture2D.ReadPixels
- Texture streaming causes all textures to be point filtered in Player when using Direct3D12 API
- [DXR] GPU memory leaks when Renderer.rayTracingMode is set to UnityEngine.Experimental.Rendering.RayTracingMode.DynamicGeometry
- RegisterValueChangeCallback is not called when changing the PropertyField value
Add comment