ServiceBase.UnregisterOnUnloaded Property
Gets or sets whether to unregister the service when the associated View is unloaded. This is a dependency property.
Namespace: DevExpress.Mvvm.UI
Assembly: DevExpress.Xpf.Core.v24.1.dll
NuGet Package: DevExpress.Wpf.Core
Declaration
Property Value
Type | Description |
---|---|
Boolean |
|
Remarks
If you pass a View Model to a service through service methods (for example, the viewModel
parameter in the DialogService.ShowDialog method) and reuse the View Model between method calls, the service stays in memory with the associated View. Set the UnregisterOnUnloaded
property to true
to change this behavior and prevent memory leaks.
See Also