You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix: Prevent memory leak from implicit SAM conversion (#588)
The lint tool reported an "ImplicitSamInstance" warning in PictureInPictureSnippets.kt. Lambdas used as listeners were being implicitly converted to new SAM instances, causing removeOnUserLeaveHintListener to fail because the listener instances did not match. This could lead to a memory leak.
This commit fixes the issue by explicitly wrapping the listener lambdas in a 'Runnable' instance. This ensures a stable object reference is used for both adding and removing the listener.
0 commit comments