public void close() { if (diskOut != null) { try { diskOut.Dispose(); } finally { diskOut = null; } } #if DEBUG GC.SuppressFinalize(this); // Disarm lock-release checker #endif }
public void testEmpty() { TemporaryBuffer b = new TemporaryBuffer(); try { b.close(); Assert.AreEqual(0, b.Length); byte[] r = b.ToArray(); Assert.IsNotNull(r); Assert.AreEqual(0, r.Length); } finally { b.destroy(); } }