Skip to main content

VirtualSourceBase.Dispose() Method

Disposes of the virtual source.

Namespace: DevExpress.WinUI.Grid

Assembly: DevExpress.WinUI.Grid.v23.2.dll

NuGet Package: DevExpress.WinUI

Declaration

public void Dispose()

Remarks

To dispose of a virtual source:

  1. Handle the Page’s Unloaded event.
  2. Call the Dispose method.
public MainPage() {
    // ...
    Unloaded += (o, e) => {
        source.Dispose();
    };
}

If you do not dispose of a source, the thread in which the source responds to requests can slow down. You may not dispose of a source if the source’s lifetime coincides with the application’s lifetime.

Refer to the following help topic for more information: Fetch Data.

See Also