mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-06 04:00:07 +00:00
Cleanup Finalizer/Dispose for BrowserSettings and CefSettings
This commit is contained in:
@@ -80,9 +80,17 @@ namespace CefSharp
|
||||
CefBrowserSettings* _browserSettings;
|
||||
|
||||
public:
|
||||
BrowserSettings() : _browserSettings(new CefBrowserSettings()), _isFinalized(false) { }
|
||||
!BrowserSettings() { delete _browserSettings; _isFinalized = true; }
|
||||
~BrowserSettings() { if (!_isFinalized) this->!BrowserSettings(); }
|
||||
BrowserSettings() : _browserSettings(new CefBrowserSettings()) { }
|
||||
|
||||
!BrowserSettings()
|
||||
{
|
||||
delete _browserSettings;
|
||||
}
|
||||
|
||||
~BrowserSettings()
|
||||
{
|
||||
this->!BrowserSettings();
|
||||
}
|
||||
|
||||
property String^ StandardFontFamily
|
||||
{
|
||||
|
||||
@@ -32,8 +32,15 @@ namespace CefSharp
|
||||
_cefCommandLineArgs = gcnew Dictionary<String^, String^>();
|
||||
}
|
||||
|
||||
!CefSettings() { delete _cefSettings; }
|
||||
~CefSettings() { delete _cefSettings; }
|
||||
!CefSettings()
|
||||
{
|
||||
delete _cefSettings;
|
||||
}
|
||||
|
||||
~CefSettings()
|
||||
{
|
||||
this->!CefSettings();
|
||||
}
|
||||
|
||||
virtual property IEnumerable<CefCustomScheme^>^ CefCustomSchemes
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user