X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2FTizen.NUI%2Fsrc%2Finternal%2FSlotObserver.cs;h=db65be63be5c81eb824fe4eaae72fdd89de3c77c;hb=06b1f35cb3cf8a972d4d4b65a2f2d56dfc6982bd;hp=2066b0b35635942dcbe40514a362e0865e6646f3;hpb=2e389b67b7fbb10449d2ff1259233dc355614307;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git diff --git a/src/Tizen.NUI/src/internal/SlotObserver.cs b/src/Tizen.NUI/src/internal/SlotObserver.cs index 2066b0b..db65be6 100755 --- a/src/Tizen.NUI/src/internal/SlotObserver.cs +++ b/src/Tizen.NUI/src/internal/SlotObserver.cs @@ -8,9 +8,9 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { - -public class SlotObserver : global::System.IDisposable { +namespace Tizen.NUI { + + internal class SlotObserver : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -24,10 +24,15 @@ public class SlotObserver : global::System.IDisposable { } ~SlotObserver() { - Dispose(); + DisposeQueue.Instance.Add(this); } public virtual void Dispose() { + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + lock(this) { if (swigCPtr.Handle != global::System.IntPtr.Zero) { if (swigCMemOwn) { @@ -40,6 +45,7 @@ public class SlotObserver : global::System.IDisposable { } } + public virtual void SlotDisconnected(SWIGTYPE_p_Dali__CallbackBase callback) { NDalicPINVOKE.SlotObserver_SlotDisconnected(swigCPtr, SWIGTYPE_p_Dali__CallbackBase.getCPtr(callback)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();