Modify dispose issue for window
authorzhouleonlei <zhouleon.lei@samsung.com>
Tue, 22 Dec 2020 10:13:21 +0000 (18:13 +0800)
committerhuiyueun <35286162+huiyueun@users.noreply.github.com>
Mon, 11 Jan 2021 05:49:43 +0000 (14:49 +0900)
src/Tizen.NUI/src/public/Window.cs

index 36cc3a3..9bd4af2 100755 (executable)
@@ -1168,11 +1168,14 @@ namespace Tizen.NUI
                 {
                     PropertyValue value = new PropertyValue((int)orientations[i]);
                     orientationArray.PushBack(value);
-                    value.Dispose();
                 }
             }
 
             Interop.Window.SetAvailableOrientations(SwigCPtr, PropertyArray.getCPtr(orientationArray));
+            for (uint i = 0; i < orientationArray.Count(); i++)
+            {
+                orientationArray[i].Dispose();
+            }
             orientationArray.Dispose();
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }