[NUI] Initialize C# items if required
authorEunki, Hong <eunkiki.hong@samsung.com>
Thu, 14 Dec 2023 02:44:43 +0000 (11:44 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Tue, 9 Jan 2024 09:23:06 +0000 (18:23 +0900)
We have create ProcessorController constructor without initalize as default.

If NUI core want to change this policy, we can initialize at constructor time.
But this case code has some error. It didn't create C# side objects and only create
native side.

Let we make constructor with initialize works well now.

Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
src/Tizen.NUI/src/internal/Common/ProcessorController.cs

index a5c4dbad0a665f400f9c6e03493f7702a7895092..494dfa4e4653e20fd5d147875c88d1f0b96c0165 100755 (executable)
@@ -40,8 +40,12 @@ namespace Tizen.NUI
         {
         }
 
-        private ProcessorController(bool initializeOnConstructor) : this(initializeOnConstructor ? Interop.ProcessorController.New() : Interop.ProcessorController.NewWithoutInitialize(), true)
+        private ProcessorController(bool initializeOnConstructor) : this(Interop.ProcessorController.NewWithoutInitialize(), true)
         {
+            if (initializeOnConstructor)
+            {
+                Initialize();
+            }
         }
 
         internal ProcessorController(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)