ContextWindow: Dispose context after creating new one

This commit is contained in:
2024-02-29 02:04:54 +01:00
parent d897e44f3b
commit 3b94875a7f

View File

@ -46,10 +46,11 @@ namespace Elwig.Windows {
protected async Task RenewContext() {
if (!_renewPending) return;
Context.Dispose();
var old = Context;
Context = new();
await OnRenewContext();
_renewPending = false;
old.Dispose();
}
abstract protected Task OnRenewContext();