We use the World Map (leaflet plugin) on our dashboard that we would like to leave running 24/7 on a large format display. We currently cannot because there is a memory leak that I think is in the way that the widgets get reloaded via AJAX call “function widget_reload(id,data_type)”. The documentation for leaflet states that the function “remove()” should be used to properly garbage collect a map and its children.
The issue is that over enough time, these abandoned objects add up in used memory to the browser, and eventually crash the browser instance.
I appears that in “widget_reload”, the entire grid is called to be destroyed, but the map object and its children get abandoned. I think, if before that action takes place, if it could be checked that if this grid contains the leaflet plugin, then to call the function “map.remove()”, this would resolve the issue of abandoned map objects (memory leak).
Demonstration of increasing memory use, and objects abandoned.