mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Dispose of LibCef Drivers when done
This commit is contained in:
parent
324888a759
commit
840d4fcfb3
@ -31,7 +31,7 @@ namespace Wabbajack
|
||||
{
|
||||
var cancel = new CancellationTokenSource();
|
||||
var oldPane = MainWindow.ActivePane;
|
||||
var vm = await WebBrowserVM.GetNew();
|
||||
using var vm = await WebBrowserVM.GetNew();
|
||||
MainWindow.NavigateTo(vm);
|
||||
vm.BackCommand = ReactiveCommand.Create(() =>
|
||||
{
|
||||
|
@ -14,7 +14,7 @@ using Wabbajack.Lib.WebAutomation;
|
||||
|
||||
namespace Wabbajack
|
||||
{
|
||||
public class WebBrowserVM : ViewModel, IBackNavigatingVM
|
||||
public class WebBrowserVM : ViewModel, IBackNavigatingVM, IDisposable
|
||||
{
|
||||
[Reactive]
|
||||
public string Instructions { get; set; }
|
||||
@ -38,5 +38,10 @@ namespace Wabbajack
|
||||
// Make sure libraries are extracted first
|
||||
return new WebBrowserVM(url);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Browser.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user