public void CloseDatabase(IDatabaseReference databaseReference) { if (databaseReference == null) { return; } databaseReference?.BeforeDispose(); Databases.Remove(databaseReference); databaseReference?.Dispose(); GC.Collect(); GC.WaitForPendingFinalizers(); GC.Collect(); }
public void AddDatabase(IDatabaseReference databaseReference) { Databases.Add(databaseReference); }