Fix handle leak (#333)
authorgotoextreme <hhstark.kang@samsung.com>
Mon, 16 Jul 2018 06:27:54 +0000 (15:27 +0900)
committersemun-lee <35090067+semun-lee@users.noreply.github.com>
Mon, 16 Jul 2018 06:27:54 +0000 (15:27 +0900)
* Fix handle leak

Signed-off-by: hyunho <hhstark.kang@samsung.com>
* Update NotificationReplyAction.cs

src/Tizen.Applications.Notification/Tizen.Applications.Notifications/NotificationReplyAction.cs

index 38cd443..80b4908 100755 (executable)
@@ -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);
+
             }
         }
     }