From 83d9807adf292be9fe3806c5073d4fdce4194812 Mon Sep 17 00:00:00 2001 From: chanywa Date: Mon, 3 Apr 2017 12:38:06 +0900 Subject: [PATCH] fixed that a map object on the mapview is removed after clicked Change-Id: I6997b05c4a6554da4737349990e0362d319dd28a --- packaging/csapi-maps.spec | 2 +- src/Tizen.Maps/Interop/Interop.SafeMapsHandle.cs | 5 +++++ src/Tizen.Maps/Interop/Interop.View.Event.Data.cs | 2 +- src/Tizen.Maps/Interop/Interop.View.Object.cs | 4 ++-- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/packaging/csapi-maps.spec b/packaging/csapi-maps.spec index ba5bf09..627258d 100644 --- a/packaging/csapi-maps.spec +++ b/packaging/csapi-maps.spec @@ -9,7 +9,7 @@ Name: csapi-maps Summary: Tizen Map Service API for C# Version: 1.0.9 -Release: 2 +Release: 3 Group: Development/Libraries License: Apache-2.0 URL: https://www.tizen.org diff --git a/src/Tizen.Maps/Interop/Interop.SafeMapsHandle.cs b/src/Tizen.Maps/Interop/Interop.SafeMapsHandle.cs index 43ae47c..0ecc7e5 100755 --- a/src/Tizen.Maps/Interop/Interop.SafeMapsHandle.cs +++ b/src/Tizen.Maps/Interop/Interop.SafeMapsHandle.cs @@ -45,6 +45,11 @@ internal static partial class Interop return ctor(NativeGet(getter, propertyName)); } + internal static T NativeGet(GetterMethod getter, Func ctor, bool hasOwnership, [CallerMemberName] string propertyName = "") where T : SafeMapsHandle + { + return ctor(NativeGet(getter, propertyName), hasOwnership); + } + internal static string NativeGet(GetterMethod getter, [CallerMemberName] string propertyName = "") { string value; diff --git a/src/Tizen.Maps/Interop/Interop.View.Event.Data.cs b/src/Tizen.Maps/Interop/Interop.View.Event.Data.cs index 003052c..c1cde38 100755 --- a/src/Tizen.Maps/Interop/Interop.View.Event.Data.cs +++ b/src/Tizen.Maps/Interop/Interop.View.Event.Data.cs @@ -131,7 +131,7 @@ internal static partial class Interop internal ViewObjectHandle ViewObject { - get { return NativeGet(this.GetObject, ViewObjectHandle.Create); } + get { return NativeGet(this.GetObject, ViewObjectHandle.Create, false ); } } // event_data will be released automatically after this callback is terminated. diff --git a/src/Tizen.Maps/Interop/Interop.View.Object.cs b/src/Tizen.Maps/Interop/Interop.View.Object.cs index ed10c0a..af2834f 100755 --- a/src/Tizen.Maps/Interop/Interop.View.Object.cs +++ b/src/Tizen.Maps/Interop/Interop.View.Object.cs @@ -65,9 +65,9 @@ internal static partial class Interop { } - internal static ViewObjectHandle Create(IntPtr nativeHandle) + internal static ViewObjectHandle Create(IntPtr nativeHandle, bool needToRelease) { - return new ViewObjectHandle(nativeHandle, true); + return new ViewObjectHandle(nativeHandle, needToRelease); } } } -- 2.7.4