User:Mdaniels5757/chromeAutoGarbageCollect.js

/** * @file This script just runs Chrome's garbage collector periodically. * (every wait_ms milliseconds (where wait_ms > 60000), to be exact). * Made because there's some sort of memory leak in one script/gadget or another * and I can't be bothered to figure out which. * The relevant Chrome flag must be enabled for this to work. * * @copyright Copyright 2020 Michael Daniels (Wikipedia User:Mdaniels5757) * @license Your choice of CC-BY-SA-3.0 (https://creativecommons.org/licenses/by-sa/3.0/legalcode) and Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) */

var wait_ms = 61000;

function runGC { window.gc; setTimeout( function {		runGC;	}, wait_ms); }

runGC;