[WiFi][Connection] Apply CAPIs for thread handling (#134)
[platform/core/csapi/tizenfx.git] / src / Tizen.Network.WiFi / Tizen.Network.WiFi / WiFiManager.cs
index 2c39137..96d613c 100755 (executable)
@@ -29,6 +29,8 @@ namespace Tizen.Network.WiFi
     [EditorBrowsable(EditorBrowsableState.Never)]
     public sealed class SafeWiFiManagerHandle : SafeHandle
     {
+        private int tid;
+
         internal SafeWiFiManagerHandle() : base(IntPtr.Zero, true)
         {
         }
@@ -51,10 +53,19 @@ namespace Tizen.Network.WiFi
         /// </summary>
         protected override bool ReleaseHandle()
         {
-            Interop.WiFi.Deinitialize(this.handle);
+            Interop.WiFi.Deinitialize(tid, this.handle);
             this.SetHandle(IntPtr.Zero);
             return true;
         }
+
+        internal int TID
+        {
+            set
+            {
+                tid = value;
+                Log.Info(Globals.LogTag, "New Handle for Thread " + tid);
+            }
+        }
     }
 
     /// <summary>