From: hjhun <36876573+hjhun@users.noreply.github.com> Date: Wed, 1 Feb 2023 02:58:23 +0000 (+0900) Subject: Make it ineligible for garbage collection for delegate (#4948) X-Git-Tag: submit/tizen/20230201.082803~1^2~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0de0ec39fcb6f503c428d250917d81adfdd356fd;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git Make it ineligible for garbage collection for delegate (#4948) This patch is to prevent the delegate garbage collected. Signed-off-by: Hwankyu Jhun --- diff --git a/src/Tizen.Applications.Common/Tizen.Applications/Bundle.cs b/src/Tizen.Applications.Common/Tizen.Applications/Bundle.cs index 7a3d44fc8..aa63d9ddf 100644 --- a/src/Tizen.Applications.Common/Tizen.Applications/Bundle.cs +++ b/src/Tizen.Applications.Common/Tizen.Applications/Bundle.cs @@ -98,6 +98,7 @@ namespace Tizen.Applications }; Interop.Bundle.Foreach(_handle, iterator, IntPtr.Zero); + GC.KeepAlive(iterator); if ((BundleErrorFactory.BundleError)ErrorFacts.GetLastResult() == BundleErrorFactory.BundleError.InvalidParameter) { throw new ArgumentException("Invalid parameter - cannot create bundle instance");