From: gotoextreme Date: Mon, 16 Jul 2018 06:27:54 +0000 (+0900) Subject: Fix handle leak (#333) X-Git-Tag: submit/tizen/20180716.154231~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bc81d57a94712c99379b4fdb990e484be1916d9e;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git Fix handle leak (#333) * Fix handle leak Signed-off-by: hyunho * Update NotificationReplyAction.cs --- diff --git a/src/Tizen.Applications.Notification/Tizen.Applications.Notifications/NotificationReplyAction.cs b/src/Tizen.Applications.Notification/Tizen.Applications.Notifications/NotificationReplyAction.cs index 38cd443e0..80b4908bc 100755 --- a/src/Tizen.Applications.Notification/Tizen.Applications.Notifications/NotificationReplyAction.cs +++ b/src/Tizen.Applications.Notification/Tizen.Applications.Notifications/NotificationReplyAction.cs @@ -104,12 +104,14 @@ namespace Tizen.Applications.Notifications } } - Bundle bundle = new Bundle(); - bundle.AddItem(replyKey, ((int)this.ParentIndex).ToString()); - Interop.Notification.SetExtensionData(notification.Handle, replyKey, bundle.SafeBundleHandle); - + using (Bundle bundle = new Bundle()) + { + bundle.AddItem(replyKey, ((int)this.ParentIndex).ToString()); + Interop.Notification.SetExtensionData(notification.Handle, replyKey, bundle.SafeBundleHandle); + } Interop.Notification.SetPlaceHolderLength(notification.Handle, this.ReplyMax); Interop.Notification.SetText(notification.Handle, NotificationText.PlaceHolder, PlaceHolderText, null, -1); + } } }