Lucene.Net.Store.MockRAMDirectory.Dispose C# (CSharp) Method

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void
        protected override void Dispose(bool disposing)
        {
            lock (this)
            {
                if (openFiles == null)
                {
                    openFiles = new Dictionary<string, int>();
                    openFilesDeleted = Support.Compatibility.SetFactory.GetSet<string>();
                }
                if (noDeleteOpenFile && openFiles.Count > 0)
                {
                    // RuntimeException instead of IOException because
                    // super() does not throw IOException currently:
                    throw new System.SystemException("MockRAMDirectory: cannot close: there are still open files: " + openFiles);
                }
            }

            base.Dispose(disposing);
        }