From: Dongsug Song Date: Wed, 9 Jun 2021 02:07:45 +0000 (+0900) Subject: [NUI] Fix implicit dispose exception defect X-Git-Tag: accepted/tizen/unified/20231205.024657~1785 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f1e6a1530917c096ba5035bf437499bd10a475b4;hp=8f892c5958e86eae0bacced23bbe32bedac11a50;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] Fix implicit dispose exception defect --- diff --git a/src/Tizen.NUI/src/public/BaseComponents/ViewInternal.cs b/src/Tizen.NUI/src/public/BaseComponents/ViewInternal.cs index dcc801e..a51b48b 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/ViewInternal.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/ViewInternal.cs @@ -1144,14 +1144,17 @@ namespace Tizen.NUI.BaseComponents //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. - if (this != null) + + // equivalent to "if (this != null)". more clear to understand. + if (this.HasBody()) { DisConnectFromSignals(); - } - foreach (View view in Children) - { - view.InternalParent = null; + foreach (View view in Children) + { + view.InternalParent = null; + } + } base.Dispose(type);