public void Clear() { lock (_spawners) { foreach (var spawner in _spawners.Values) spawner.Dispose(); _spawners.Clear(); } }