Back to Devexpress

BaseObjectSpace.Disposed Event

expressappframework-devexpress-dot-expressapp-dot-baseobjectspace-b1b2f6b1.md

latest2.4 KB
Original Source

BaseObjectSpace.Disposed Event

Occurs before an Object Space is disposed of.

Namespace : DevExpress.ExpressApp

Assembly : DevExpress.ExpressApp.v25.2.dll

NuGet Package : DevExpress.ExpressApp

Declaration

csharp
public event EventHandler Disposed
vb
Public Event Disposed As EventHandler

Event Data

The Disposed event's data class is EventArgs.

Remarks

This event is raised as a result of calling the BaseObjectSpace.Dispose method. This method releases all resources allocated by the ObjectSpace and speeds up system performance. Handle this event to release custom resources before the current Object Space is disposed of.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Disposed event.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

xaf-custom-logon-parameters/CS/XPO/WebForms/CustomLogonXPOWeb/CustomLogonXPOWeb.Web/Global.asax.cs#L61

csharp
nonPersistentObjectSpace.AdditionalObjectSpaces.Add(additionalObjectSpace);
nonPersistentObjectSpace.Disposed += (s2, e2) => {
    additionalObjectSpace.Dispose();

Implements

Disposed

See Also

BaseObjectSpace Class

BaseObjectSpace Members

DevExpress.ExpressApp Namespace