public void FreeMemory(bool freecache) { lock (_lock) { _internalOP = true; _log("freeing memory"); _deleted.FreeMemory(); _hash.SaveIndex(); foreach (Cache c in _index.Values) { if (freecache) { long off = SaveBitmap(c.GetCompressedBits(), c.LastBitSaveLength, c.FileOffset); c.isDirty = false; c.FileOffset = off; c.FreeMemory(true); } else { c.FreeMemory(false); } } _internalOP = false; } }
public void FreeMemory(bool unload, bool freeUncompressedMemory = true) { if (freeUncompressedMemory && _bits != null) { _bits.FreeMemory(); } if (unload) { _bits = null; isLoaded = false; } }