Welcome Guest Search | Active Topics | Sign In | Register

WebView.Destroy vs Dispose Options
Panda
Posted: Tuesday, June 27, 2017 9:58:25 PM
Rank: Advanced Member
Groups: Member

Joined: 10/7/2015
Posts: 35
I was just wanting advice on which method to use when disposing a webview object - webview.Destroy() or webview.Dispose or both?

I have some code which uses webview.Destroy() which seems to dispose correctly.
But I have seen code on the forum here, that uses both.
Is Destroy() a wrapper that calls Dispose() anyway?

eo_support
Posted: Wednesday, June 28, 2017 8:04:09 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

They are close but they are not exactly the same. WebView inherits from Component so it inherits the Component class's Dispose implementation, which does things related to Component. For example, it would remove the component from it's Container.

Component's Dispose also triggers Disposed event. WebView handles this event and calls Destroy.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.