MemoryMappedViewAccessor.Flush Method ()

.NET Framework (current version)

The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Clears all buffers for this view and causes any buffered data to be written to the underlying file.

Namespace:   System.IO.MemoryMappedFiles
Assembly:  System.Core (in System.Core.dll)

public void Flush()

Exception Condition

Methods were called after the accessor was closed.

If you are using views that are adjacent to each other, this method will also clear the following data, provided its size is equal to a multiple of the system page size:

  • Any data that precedes the view up until the latest file offset.

  • Any data that follows the view up until the earliest file offset.

.NET Framework
Available since 4.0
Return to top