-
Does Avalonia provide a concept for disposing views? That is, is there any point where I can actively call Consider the following scenario: A Or is my entire idea of explicitly controlling the lifecycle of views flawed? Should I instead consider each view a Singelton and use ReactivUIs |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Controls are .NET objects and don't hold any native resources. Therefore, there is nothing to dispose. If your control needs to manage some native resource, either handle AttachedTo/DetachedFromVisualTree callbacks (or WhenActivated if you use ReactiveUI) or implement your own lifetime management. |
Beta Was this translation helpful? Give feedback.
Controls are .NET objects and don't hold any native resources. Therefore, there is nothing to dispose. If your control needs to manage some native resource, either handle AttachedTo/DetachedFromVisualTree callbacks (or WhenActivated if you use ReactiveUI) or implement your own lifetime management.