public static MemCounter Get() { lock (MemCounterSingletonLocker) { if (SingletonContext == null) { Application.Current.Dispatcher.Invoke(new Action(() => { SingletonContext = new MemCounter(); #if (DEBUG) SingletonContext.Show(); #endif })); return(SingletonContext); } return(SingletonContext); } }
public static MemCounter Get() { lock (MemCounterSingletonLocker) { if (SingletonContext == null) { Application.Current.Dispatcher.Invoke(new Action(() => { SingletonContext = new MemCounter(); #if(DEBUG) SingletonContext.Show(); #endif })); return SingletonContext; } return SingletonContext; } }