File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -510,11 +510,14 @@ private void FreeUnmanagedResources()
510510 /// Loads the specified URL.
511511 /// </summary>
512512 /// <param name="url">The URL to be loaded.</param>
513- public void Load ( String url )
513+ public void Load ( string url )
514514 {
515515 if ( IsBrowserInitialized )
516516 {
517- this . GetMainFrame ( ) . LoadUrl ( url ) ;
517+ using ( var frame = this . GetMainFrame ( ) )
518+ {
519+ frame . LoadUrl ( url ) ;
520+ }
518521 }
519522 else
520523 {
Original file line number Diff line number Diff line change @@ -2227,7 +2227,10 @@ public void Load(string url)
22272227 // or before OnApplyTemplate has been called
22282228 if ( browser != null )
22292229 {
2230- browser . MainFrame . LoadUrl ( url ) ;
2230+ using ( var frame = browser . MainFrame )
2231+ {
2232+ frame . LoadUrl ( url ) ;
2233+ }
22312234 }
22322235 }
22332236
You can’t perform that action at this time.
0 commit comments