[NUI] Add method to destroy a window (#961)
authortscholb <scholb.kim@samsung.com>
Tue, 6 Aug 2019 01:36:36 +0000 (10:36 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Tue, 6 Aug 2019 01:36:36 +0000 (10:36 +0900)
src/Tizen.NUI/src/public/Window.cs

index bf4a2a8d4c83e60303920fe71a79a59f72799810..fe5a2bbe6a662fb0304f167316a3c19e32d05607 100755 (executable)
@@ -996,6 +996,15 @@ namespace Tizen.NUI
             }
         }
 
+        /// <summary>
+        /// Destroy the window immediately.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public void Destroy()
+        {
+            this.Dispose();
+        }
+
         /// <summary>
         /// Keep rendering for at least the given amount of time.
         /// </summary>
@@ -1472,7 +1481,14 @@ namespace Tizen.NUI
                 //Called by User
                 //Release your own managed resources here.
                 //You should release all of your own disposable objects here.
+                _rootLayer.Dispose();
+                localController.Dispose();
 
+                foreach(var layer in _childLayers)
+                {
+                    layer.Dispose();
+                }
+                _childLayers.Clear();
             }
 
             this.DisconnectNativeSignals();