[NUI] Remove duplicate ?. operator and use using statement
authorJiyun Yang <ji.yang@samsung.com>
Wed, 19 Apr 2023 07:27:50 +0000 (16:27 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Mon, 22 May 2023 10:12:20 +0000 (19:12 +0900)
Signed-off-by: Jiyun Yang <ji.yang@samsung.com>
src/Tizen.NUI/src/public/ViewProperty/Shadow.cs

index dc7ac8d..eecbd12 100755 (executable)
@@ -71,14 +71,16 @@ namespace Tizen.NUI
         internal Shadow(PropertyMap propertyMap) : base(propertyMap)
         {
             Color = new Color(noColor);
-            PropertyValue pValue = propertyMap.Find(ColorVisualProperty.MixColor);
-            pValue?.Get(Color);
-            pValue?.Dispose();
+            using (PropertyValue mixColorValue = propertyMap.Find(ColorVisualProperty.MixColor))
+            {
+                mixColorValue?.Get(Color);
+            }
 
             float blurRadius = 0;
-            pValue = propertyMap.Find(ColorVisualProperty.BlurRadius);
-            pValue?.Get(out blurRadius);
-            pValue?.Dispose();
+            using (PropertyValue blurRadiusValue = propertyMap.Find(ColorVisualProperty.BlurRadius))
+            {
+                blurRadiusValue?.Get(out blurRadius);
+            }
             BlurRadius = blurRadius;
         }