/// <summary> /// Disposes of all elements in _sceneResources /// </summary> public virtual void Dispose() { _frameTimer.Cancel(); _graphicsDevice.WaitForIdle(); foreach (var child in _allChildren) { child.Dispose(); } _allChildren.Clear(); _frameTimer.Dispose(); _factory.DisposeCollector.DisposeAll(); _graphicsDevice.WaitForIdle(); _graphicsDevice.Dispose(); _contextWindow.Close(); }