[NUI] Picker: Protect delegate from GC
authorWoochanLee <wc0917.lee@samsung.com>
Thu, 13 Oct 2022 10:47:24 +0000 (19:47 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Thu, 13 Oct 2022 11:10:41 +0000 (20:10 +0900)
src/Tizen.NUI.Components/Controls/Picker.cs

index 3c8f56a..de307e0 100755 (executable)
@@ -938,6 +938,7 @@ namespace Tizen.NUI.Components
 
                 customScrollAlphaFunction = new UserAlphaFunctionDelegate(CustomScrollAlphaFunction);
                 animation.DefaultAlphaFunction = new AlphaFunction(customScrollAlphaFunction);
+                GC.KeepAlive(customScrollAlphaFunction);
                 animation.Duration = (int)panAnimationDuration;
                 animation.AnimateTo(ContentContainer, "PositionY", (int)destination);
                 animation.Play();