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