InputSystem
InputSystem copied to clipboard
Update OnScreenStick.cs - fix memory leak
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.
@ekcoh thank you for review, I have added
Seems problematic to land from fork. I rerouted your fix via https://github.com/Unity-Technologies/InputSystem/pull/2006 and marked your contrib in the CHANGELOG so will close this PR and let the other land when reviewed and approved by the team. Thanks @LukeUnityDev