diff options
author | Seungkeun Lee <sngn.lee@samsung.com> | 2016-10-26 09:29:58 +0900 |
---|---|---|
committer | Seungkeun Lee <sngn.lee@samsung.com> | 2016-10-26 15:16:38 +0900 |
commit | dbd7327972325d3c53fe8b8e74b4bfbfde8cf097 (patch) | |
tree | afab723214e0207b5df968a6cfbe2886955c487c | |
parent | c0271f727e6d352aed3089f955a8581d2617e5e9 (diff) | |
download | elm-sharp-dbd7327972325d3c53fe8b8e74b4bfbfde8cf097.tar.gz elm-sharp-dbd7327972325d3c53fe8b8e74b4bfbfde8cf097.tar.bz2 elm-sharp-dbd7327972325d3c53fe8b8e74b4bfbfde8cf097.zip |
Hold added object reference in ItemObject
- The lifecycle of added object will same with contained object
Change-Id: I01be33a413f5b3706a7828c2b9e5016268931a24
-rw-r--r-- | ElmSharp/ElmSharp/ItemObject.cs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ElmSharp/ElmSharp/ItemObject.cs b/ElmSharp/ElmSharp/ItemObject.cs index a3cc6e2..fb44251 100644 --- a/ElmSharp/ElmSharp/ItemObject.cs +++ b/ElmSharp/ElmSharp/ItemObject.cs @@ -12,6 +12,7 @@ namespace ElmSharp private static Dictionary<IntPtr, ItemObject> s_HandleToItemTable = new Dictionary<IntPtr, ItemObject>(); private static int s_globalId = 0; + readonly Dictionary<string, EvasObject> _partContents = new Dictionary<string, EvasObject>(); Interop.Evas.SmartCallback _deleteCallback; IntPtr _handle = IntPtr.Zero; @@ -81,6 +82,7 @@ namespace ElmSharp Interop.Elementary.elm_object_item_part_content_unset(Handle, part); } Interop.Elementary.elm_object_item_part_content_set(Handle, part, content); + _partContents[part ?? "__default__"] = content; } public void SetPartText(string part, string text) @@ -128,6 +130,7 @@ namespace ElmSharp { s_HandleToItemTable.Remove(_handle); } + _partContents.Clear(); _handle = IntPtr.Zero; } |