private void Stop()
        {
            if (context == null)
            {
                return;
            }

            EditorApplication.update -= Step;
            EditorApplication.playModeStateChanged    -= OnPlayModeStateChange;
            AssemblyReloadEvents.beforeAssemblyReload -= OnBeforeAssemblyReload;

            context.OnDestroy();

            lock (_lock)
            {
                if (instance == this)
                {
                    instance = null;
                }
            }

            context = null;
        }
 private EditorRoutineManager()
 {
     this.context = new RoutineContext();
 }