The scenario is: each time user click on "Scan", a new tab is displayed and user can select images to scan, the tab will be close automatically when scan is completed.

We use the following statements to load DWT when the tab is displayed:----------------------------------// this.id will increase each timeDynamsoft.WebTwainEnv.Containers.push({ContainerId: "dwtcontrolContainer" + this.id, Width: "10", Height: "10"});Dynamsoft.WebTwainEnv.Load();Dynamsoft.WebTwainEnv.RegisterEvent("OnWebTwainReady", lang.hitch(this, this.onWebTwainReady));-----------------------------------

And use the following to unload DWT when the tab is close:-----------------------------------Dynamsoft.WebTwainEnv.Unload();-----------------------------------

However, I found that the "WebTWAINService.exe" process does not actually exit. Each time I open a "Scan" tab, the "Dynamsoft.WebTwainEnv.Containers.push({ContainerId: "dwtcontrolContainer" + this.id, Width: "10", Height: "10"});" will be executed one more time and a new "WebTWAINService.exe" process will be launched.

This results in a lot of "WebTWAINService.exe" processes and browser(e.g.:IE) is occupying more and more memory.

Am I using the right method to close and unload the DWT ? Could you give me any advice ?

You are using the right method. Load() and Unload() methods are for initializing Dynamic Web TWAIN manually. However, there will be at least 2 processes running once Dynamsoft Service is up and running. Once there is 1 more object created, there will be 1 more process. If you need to close some of them, you can use CloseWorkingProcess.

However, after running "Dynamsoft.WebTwainEnv.Load();", the "Containers" array contains only 1 item, which is the latter one: dwtcontrolContainer1.

In the env that use DWT v12.0, the "Containers" array contains 2 items and after running the "Dynamsoft.WebTwainEnv.Load();", the "Containers" array is still 2 items. And with I scan one more time, the array contains one more item, hence the number of "WebTWAINService.exe" processes increases.

Is there any changes in the "Dynamsoft.WebTwainEnv.Load();" method between v11.0 and v12.0 ? How to prevent the number of "WebTWAINService.exe" processes from increasing ?

I also tried to use CloseWorkingProcess to close the scanning process when scanning is complete, and the "WebTWAINService.exe" process is killed, this is good.

However, the websocket in IE does not seem to be released. After I scan 6 times, the number of websockets becomes 6 (By default, IE allows 6 concurrent websockets to one server). When I tried to scan the 7th time, IE does not allow to create new websocket, hence the connection to "WebTWAINService.exe" process failed and a message box appears, prompting me to download the DWT HTML5 Edition application.

When I use the dynamsoft.webtwain.initiate.js version 11.0, the above issue does NOT occur; the issue occurs when I use dynamsoft.webtwain.initiate.js 12.0.

From the guide, I notice that using the CreateDWTObject function needs to explicitly pass the ip, port and SSLPort parameters, is there any default value for these parameters ? Because in the old 'Load()' function, we do not need to care about the ip and port.

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum