protected virtual void Dispose(bool disposing)
{
if (disposing)
{
if (_tooltipTimer != null)
{
_tooltipTimer.Stop();
}
if (_browserPageImage != null)
{
_browserPageImage.Source = null;
_browserPageImage = null;
}
if (_browserPageBitmap != null)
{
_browserPageBitmap = null;
}
// if (this.browserPageD3dImage != null)
// this.browserPageD3dImage = null;
// TODO: What's the right way of disposing the browser instance?
if (_browserHost != null)
{
_browserHost.CloseBrowser();
_browserHost = null;
}
if (_browser != null)
{
_browser.Dispose();
_browser = null;
}
}
_disposed = true;
}
This is the sample code in WpfCefBrowser Dispose method, I thought we might need to call the _browserHost.Dispose(0 here. What do you think about that?