[NUI] Unified native singleton class instance getter
authorEunki Hong <eunkiki.hong@samsung.com>
Tue, 20 Feb 2024 16:30:12 +0000 (01:30 +0900)
committerSangHyeon Jade Lee <dltkdgus1764@gmail.com>
Wed, 20 Mar 2024 11:19:40 +0000 (20:19 +0900)
commite1409963624db8ebe2fa1f4015cfdabc2f453bf8
treec6423486abe2fcd089e9102b7ee42a03c500bc76
parentbe714df3518b404f99ecfef55ad89c43fab27d03
[NUI] Unified native singleton class instance getter

There was 2 way to get sigleton class - `Get()` method and `Instance` proeprty.

After merge #5683 PR, some singleton class' `Get()` method register registry at that moment.
If someone call `Instance` after `Get()` call, the singleton class become GC, due to unknown reason.

To avoid this cases, let we make `Get()` method also use `Instance` property internally, and deprecate
that method.

For watch the trends after change the singletone pattern, let we just print error log if some
NUI developer implement wrong way in future.

+

Furthermore, there was some issue when we get Instance and call Dispose().
This is strance behavior. So let we just print error log and don't allow Dispose it.

Signed-off-by: Eunki Hong <eunkiki.hong@samsung.com>
src/Tizen.NUI/src/internal/Common/KeyInputFocusManager.cs
src/Tizen.NUI/src/public/Accessibility/AccessibilityManager.cs
src/Tizen.NUI/src/public/Clipboard/Clipboard.cs
src/Tizen.NUI/src/public/Common/StyleManager.cs
src/Tizen.NUI/src/public/Common/TypeRegistry.cs
src/Tizen.NUI/src/public/Input/FocusManager.cs
src/Tizen.NUI/src/public/Utility/FontClient.cs
src/Tizen.NUI/src/public/Utility/TTSPlayer.cs
src/Tizen.NUI/src/public/Visuals/VisualFactory.cs