-
Notifications
You must be signed in to change notification settings - Fork 328
FIX: Update OnScreenStick.cs #1960
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Fix memory leak - make sure to unsubscribe started, canceled actions for m_PointerDownAction on destroy when m_UseIsolatedInputActions is set to true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for providing this fix @LukeUnityDev. It would be great if you could add a line to the CHANGELOG.md file describing under title fixed for unreleased version that a memory leak has been adressed in OnScreenStick which would leak memory when component was destroyed. When this have been updated we can land the contribution.
Added under Unreleased tag comment for memory leak OnScreenStick
@ekcoh thank you for review, I have added |
Seems problematic to land from fork. I rerouted your fix via #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 |
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.