Tizen.Log.Fatal("NUI", "Dali and NUI are version mismatched!");
}
- // Initialize DisposeQueue Singleton class. This is also required to create DisposeQueue on main thread.
- DisposeQueue.Instance.Initialize();
NUIApplicationInitEventArgs e = new NUIApplicationInitEventArgs();
// Populate all members of "e" (NUIApplicationInitEventArgs) with real data
//here we send all data to user event handlers
_applicationInitEventHandler(this, e);
}
+
+ // Initialize DisposeQueue Singleton class. This is also required to create DisposeQueue on main thread.
+ DisposeQueue.Instance.Initialize();
}
/**
private List<IDisposable> _disposables = new List<IDisposable>();
private System.Object _listLock = new object();
private EventThreadCallback _eventThreadCallback;
- private EventThreadCallback.CallbackDelegate _disposeQueueProcessDisposablesDelegate;
+ private static EventThreadCallback.CallbackDelegate _disposeQueueProcessDisposablesDelegate;
private DisposeQueue()
{
get { return _disposableQueue; }
}
+ private bool _isCalled = false;
public void Initialize()
{
+ if(_isCalled == false)
+ {
_disposeQueueProcessDisposablesDelegate = new EventThreadCallback.CallbackDelegate(ProcessDisposables);
_eventThreadCallback = new EventThreadCallback(_disposeQueueProcessDisposablesDelegate);
+ _isCalled = true;
+ }
}
public void Add(IDisposable disposable)
_disposables.Clear();
}
}
+
+ internal int CurruntAccumulatedDisposableObjects
+ {
+ get
+ {
+ return _disposables.Count;
+ }
+ }
+
}
}
protected bool swigCMemOwn;
/// <since_tizen> 3 </since_tizen>
public delegate void CallbackDelegate();
+ private const int THREASHOLD = 100;
internal EventThreadCallback(global::System.IntPtr cPtr, bool cMemoryOwn)
{
{
if ((System.IntPtr)swigCPtr != global::System.IntPtr.Zero)
{
- NDalicManualPINVOKE.EventThreadCallback_Trigger(swigCPtr);
+ if(DisposeQueue.Instance.CurruntAccumulatedDisposableObjects > THREASHOLD)
+ {
+ NDalicManualPINVOKE.EventThreadCallback_Trigger(swigCPtr);
+ }
}
if (NDalicPINVOKE.SWIGPendingException.Pending)
RefObject refObj = baseHandle.GetObjectPtr();
IntPtr refCptr = (IntPtr)RefObject.getCPtr(refObj);
- NUILog.Debug("Storing ref object cptr in control map Hex: {0:X}" + refCptr);
+ //NUILog.Debug("Storing ref object cptr in control map Hex: {0:X}" + refCptr);
if (!Instance._controlMap.ContainsKey(refCptr))
{
/// <since_tizen> 3 </since_tizen>
protected override void OnCreate()
{
- // This is also required to create DisposeQueue on main thread.
- DisposeQueue disposeQ = DisposeQueue.Instance;
- disposeQ.Initialize();
base.OnCreate();
// Dali's default layer is default center origin. need to change as top left.
{
throw new global::System.InvalidOperationException("Unimplemented type for Property Value :" + type.Name);
}
- NUILog.Debug(" got an property value of =" + type.Name);
+ //NUILog.Debug(" got an property value of =" + type.Name);
return value;
}