Rank: Advanced Member Groups: Member
Joined: 9/20/2016 Posts: 73
|
I've got strange thing with EvalScript. If I run webView1.EvalScript("function CheckClick(num) { return false; } ");
Then I can run webView1.EvalScript("var a=CheckClick(1)"); And it will be ok.
Thus, function CheckClick() stay in memory after the first call. Is it possible to clean memory from my custom scripts after calling EvalScript?
|
Rank: Advanced Member Groups: Member
Joined: 12/10/2014 Posts: 137
|
Hi,
This is pure javascript problem; if you define a function
function CheckClick(num) { return false; }
It will be a function until you navigate to another page.
If you want to remove it just redefine it to be an empty function function CheckClick(num){}
This is the default behavior for a browser.
|
Rank: Advanced Member Groups: Member
Joined: 9/20/2016 Posts: 73
|
Didn't know that. Thanks!
|