Lucene.Net.Store.MMapDirectory.MMapIndexInput.FreeBuffer C# (CSharp) Méthode

FreeBuffer() protected méthode

Try to unmap the buffer, this method silently fails if no support for that in the JVM. On Windows, this leads to the fact, that mmapped files cannot be modified or deleted.
protected FreeBuffer ( ByteBuffer buffer ) : void
buffer ByteBuffer
Résultat void
            protected internal override void FreeBuffer(ByteBuffer buffer)
            {
                // .NET port: this should free the memory mapped view accessor
                var mmfbb = buffer as MemoryMappedFileByteBuffer;

                if (mmfbb != null)
                    mmfbb.Dispose();
                /*
              if (UseUnmapHack)
              {
                try
                {
                  AccessController.doPrivileged(new PrivilegedExceptionActionAnonymousInnerClassHelper(this, buffer));
                }
                catch (PrivilegedActionException e)
                {
                  System.IO.IOException ioe = new System.IO.IOException("unable to unmap the mapped buffer");
                  ioe.initCause(e.InnerException);
                  throw ioe;
                }
              }*/
            }
MMapDirectory.MMapIndexInput