|
Rank: Advanced Member Groups: Member
Joined: 12/10/2014 Posts: 133
|
Hello, I'm using a memory profiler in order to see if my app is leaking memory; and I saw that closed EO Webview still have 2 events handler attached "GiveFocusEventHandler" and "WndMsgEventHandler" (please see attached screenshots). I didn't attach those hander using webViewEO.GiveFocus += ... ; So I believe it is attached internally. This occurs after : -> create a webview -> load a URL -> close the webview -> remove all handlers I previously attached exemple: webViewEO.LoadCompleted -= WebViewEO_OnLoadCompleted ... -> call Destroy() and Dispose() methodes I tested on the sample with the same result (see second screenshot). I waited 1h to see if the garbage collector would wipe the remaining handlers but it didn't. Thanks MY APP : EO SAMPLE :
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
Please check the version of EO.WebBrowser.dll you use. We have recently fixed an issue related to memory usage.
The two event handlers are fine. The wrapper class WebControl does hook up to these two events. So these two handlers are not from you and they alone are not an issue. However something else still references the WebView even after you have disposed it might be an issue. Specifically in your case, the Dictionary<int, n, a> entry might be an issue. This is an internal global variable map that we use and the WebView should be removed from it after a while (it may not be removed immediately). So if you do not see it being removed or even grow in size over time, then that will be an issue.
The i() root node is normal. This represents an internal thread and it references a few local variables which indirectly references to a WebView. Those references will be released as the internal thread runs.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 12/10/2014 Posts: 133
|
Hi,
We are using 3.0.91.1, i'll keep testing and come back to you
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
No problem. Please keep us updated.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 12/19/2014 Posts: 2
|
I ran into this same issue using 3.0.86.0, but with the WinForms WebControl.
The solution was to also set WebControl.WebView=Nothing (or null, in C#) when cleaning up.
Hope this helps!
|
|
Rank: Advanced Member Groups: Member
Joined: 12/10/2014 Posts: 133
|
Hello, I have done more test on the sample TabbedBrowser (with latest multi-dll build 3.0.95.1); and it appears that after opening multiple tab (always pointing to google.com) and then closing them it. Some webcontrol still remains in memory and the two event handlers are still attached (GiveFocusEventHandler & WndMsgEventHandler); I tested for like 10' and the number of webcontrol retained in memory keep rising up as I open->load->close tabs This is done on tabbedBrowser sample unmodified see attached picture :
|
|
Rank: Advanced Member Groups: Member
Joined: 12/10/2014 Posts: 133
|
Any news on this ?
Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
There is no significant difference between the new image and the old image. The instances you see in the Dictionary<int, m, a> part will go away eventually after you keep loading new request. They will NOT go away if:
1. Within 5 minutes after the last request was loaded. For example, if you have loaded a page in a WebView, then this WebView will be kept for at least 5 minutes; 2. No further request has been loaded by any WebView. For example, if you have loaded a page in WebView a, then close it, then let the application sits idle, then this WebView will not be released no matter what. However if you load another request (regardless from which WebView) after 5 minutes, then the previous WebView will be released;
The minimum 5 minutes duration and the fact that we do not trigger object release unless there are new request can cause the false impression of that the WebView will never be released. However under a normal application environment where new requests are continuously being loaded the unused WebView will eventually be released.
Thanks!
|
|