public void close() {unpackedObjectCache.clear();final PackList packs = packList.get();if (packs != NO_PACKS && packList.compareAndSet(packs, NO_PACKS)) {for (PackFile p : packs.packs)p.close();}AlternateHandle[] alt = alternates.get();if (alt != null && alternates.compareAndSet(alt, null)) {for(AlternateHandle od : alt)od.close();}}

public override void Close(){unpackedObjectCache.Clear();ObjectDirectory.PackList packs = packList.Get();packList.Set(NO_PACKS);foreach (PackFile p in packs.packs){p.Close();}FileObjectDatabase.AlternateHandle[] alt = alternates.Get();if (alt != null){alternates.Set(null);foreach (FileObjectDatabase.AlternateHandle od in alt){od.Close();}}}
