Unity-Technologies / InputSystem

An efficient and versatile input system for Unity.
Other
1.42k stars 306 forks source link

Update OnScreenStick.cs - fix memory leak #1960

Open LukeUnityDev opened 2 months ago

LukeUnityDev commented 2 months ago

Description

Fix memory leak - make sure to unsubscribe started, and canceled actions for m_PointerDownAction on destroy when m_UseIsolatedInputActions is set to true.

Changes made

Added private method OnDestroy.

Testing

Fore testing is required to add OnScreenStick component and check UseIsolatedInputActions, and setup for-example Hold interaction there.

Risk

There is no risk.

unity-cla-assistant commented 2 months ago

CLA assistant check
All committers have signed the CLA.

LukeUnityDev commented 2 weeks ago

@ekcoh thank you for review, I have added