Export (0) Print
Expand All

LogRecordSequence.Dispose Method

Releases the resources used by the component.

Namespace:  System.IO.Log
Assembly:  System.IO.Log (in System.IO.Log.dll)

public void Dispose()

Implements

IDisposable.Dispose()

ExceptionCondition
ObjectDisposedException

The method was called after the sequence has been disposed of.

OutOfMemoryException

There is not enough memory to continue the execution of the program.

This example shows how to use Dispose to release resource:

		// Create log stream 1.
				sequence1 = new LogRecordSequence(logStream1,
					FileMode.OpenOrCreate,
					FileAccess.ReadWrite,
					FileShare.ReadWrite);

		// Log Extents are shared between the two streams.  
		// Add two extents to sequence1.
				sequence1.LogStore.Extents.Add("MyExtent0", containerSize);
				sequence1.LogStore.Extents.Add("MyExtent1");

		// Create log stream 2.
				sequence2 = new LogRecordSequence(logStream2,
					FileMode.OpenOrCreate,
					FileAccess.ReadWrite,
					FileShare.ReadWrite);

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4
Show:
© 2015 Microsoft