//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.
- Window.Instance.Remove(Root);
- Root?.Dispose();
- Root = null;
-
+ if(Root != null)
+ {
+ Window.Instance.Remove(Root);
+ Root.Dispose();
+ Root = null;
+ }
base.Dispose(type);
}