InputSystem icon indicating copy to clipboard operation
InputSystem copied to clipboard

Update OnScreenStick.cs - fix memory leak

Open LukeUnityDev opened this issue 1 year ago • 2 comments

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.

LukeUnityDev avatar Jul 04 '24 08:07 LukeUnityDev

CLA assistant check
All committers have signed the CLA.

unity-cla-assistant avatar Jul 04 '24 08:07 unity-cla-assistant

@ekcoh thank you for review, I have added

ghost avatar Aug 21 '24 11:08 ghost

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

ekcoh avatar Sep 13 '24 10:09 ekcoh