2024-02-29 13:03:32 +01:00
parent cc72a8365e
commit 53a25b3be4
2 changed files with 0 additions and 8 deletions

View File

@ -39,18 +39,11 @@ namespace Elwig.Windows {
await OnRenewContext();
}
protected override void OnClosed(EventArgs evt) {
base.OnClosed(evt);
Context.Dispose();
}
protected async Task RenewContext() {
if (!_renewPending) return;
var old = Context;
Context = new();
await OnRenewContext();
_renewPending = false;
old.Dispose();
}
abstract protected Task OnRenewContext();