Hello, I have been developing a web interface for some hardware that utilizes an 8-bit microcontroller. The webpage includes HTML, JavaScript, JSON, and XHR (XMLHttpRequest) for communication purposes. My goal is to create a page that updates every 250 milliseconds with fresh data from the controller using setInterval, giving the user a 'real-time' experience akin to an application. Although I managed to make it work mostly fine, I encountered a memory leak issue in the code while testing on both IE and Chrome browsers. After conducting some research online, I discovered that others have faced similar problems and attempted different solutions without much success. Below are snippets of the code to provide a clearer understanding, with slightly altered variables for context: // initiate the page refresh timer to update values var pageRefreshTimer = window.setInterval(updateValues, 250); // Standard XHR opener HTTP.getText = function(url, callback) { var request = HTTP.newRequest(); // functionality to locate standard XMLHttpRequest functions not shown... request.onreadystatechange = function () { if (request.readyState == 4 && request.status == 200) { callback(request.responseText); } } request.open("GET", url); request.send(null); } // Function continuously refreshed by HTML page for simulating real-time application updateValues = function(parameter, value) { newURL = newURL + "?" + parameter; // Send the URL and generate the JSONObject HTTP.getText(newURL, function(JSONText) { var JSONObject = eval('(' + JSONText + ')'); // Assign object values to JavaScript variables Controller.detectorPosition = JSONObject.detectorPosition; Controller.offset = JSONObject.offset; Controller.actuatorPosition = JSONObject.actuatorPosition; }); delete JSONObject; // Attempted manual garbage collection but did not fix the memory leak } For reference, the JSON file sent from the microcontroller would resemble this form: { "offset": "1500", "detectorPosition": "1558", "actuatorPosition": "120" } Could there be a problem linked to "closures" in the code? While using Developer Tools in Chrome (Ctrl-Shift-J), I noticed multiple calls made to the ParameterValues.json file (350B size) as expected since this holds the values from the microcontroller. However, could the browser be exceptionally storing/caching each page in memory? In my comments below, two screenshots illustrate the issue. In one instance, setting up a break-point in the XMLHttpRequest loop revealed what seemed like a circular reference in the "closure" panel on the right side. Does anyone spot a problem here? How can I delve deeper to gather more information? Thank you in advance!