Okay, I never coded in Javascript, so I'm totally illiterate on that topic, but I tried to make a very simple plugin and I'm seeing something weird.
Here's my code (I basically copied it from another plugin)
It is intended to simply display my google tasks embedded in FARR when i type "todo":
plugins["todo"] = {
version: "1.0",
lastChange: new Date(fso.GetFile(currentDirectory+"\\fsubscript.js").DateLastModified).toDateString(),
displayName: "TODO",
directory: currentDirectory,
aliasstr: "todo",
icon: currentDirectory+"\\favicon.ico",
description: "Google Tasks",
search: function(querykey, explicit, queryraw, querynokeyword,modifierstring,triggermethod){
if(!explicit) return;
FARR.setStrValue("launch", "htmlviewurl https://mail.google.com/tasks/ig");
FARR.setStrValue("launch", "waitforhtml");
FARR.setStrValue("launch", "setfocus mainpanel");
FARR.setStrVAlue("EmbeddedWb.ExecJavascript", "document.getElementsByTagName('iframe')[0].contentWindow.document.getElementById('1').getElementsByTagName('div')[2].focus()");
}
};
Now, here's what's weird. Apparently the memory used to load the html is never released. Maybe this is normal, but I find it odd, because calling my "todo" plugin a few times makes the memory footprint of FARR become really high. In fact every call increases between 1 and 4 MB of memory used, and it seems that it is never released after that (only a tiny bit is released when i close the window). See this pic:
Each "jump" in the graph corresponds to me typing "todo", enter, and then closing FARR (to the background). See how it keeps increasing until i stop doing it (at which point it's using 68.4 MB). After a while, nothing changes:
Any idea what's going wrong (or what am I doing wrong?)
Edit: In a previous post I stated that a "google calendar" plugin was doing this, but I was confused, I corrected it now. I'd appreciate any hints.