GitSharp.Core.Util.TemporaryBuffer.destroy C# (CSharp) Method

destroy() public method

public destroy ( ) : void
return void
        public void destroy()
        {
            _blocks = null;

            close();

            if (_onDiskFile != null)
            {
                _onDiskFile.Delete();
                if (_onDiskFile.Exists)
                {
                    ;
                    //    onDiskFile.deleteOnExit(); // [henon] <--- hmm, how to do this?
                }
                _onDiskFile = null;
            }
        }

Usage Example

Example #1
0
 public void testDestroyWhileOpen()
 {
     TemporaryBuffer b = new TemporaryBuffer();
     try
     {
         b.write(new TestRng(getName())
                 .nextBytes(TemporaryBuffer.DEFAULT_IN_CORE_LIMIT * 2));
     }
     finally
     {
         b.destroy();
     }
 }
All Usage Examples Of GitSharp.Core.Util.TemporaryBuffer::destroy