From d3597f3d1036b4dee435911ca36d1acb161ebff3 Mon Sep 17 00:00:00 2001 From: Doxa Maps Date: Mon, 28 Sep 2026 19:55:18 +0000 Subject: [PATCH] Release the test hooks on unmount, all twelve of them MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Twelve globals were set across three plugins and none was ever deleted. Each pins whatever it closes over — a map instance pins its canvas, its sources and through them the whole app — so every mount left another copy behind, measured elsewhere at roughly 10 MB each. Released as a set rather than one at a time. A block that sets several globals and clears the obvious one leaks the rest silently, and the obvious one is whichever the author happened to remember. Identity-checked, which is why the value is recorded as it is set rather than cleared by name. Two instances can share a page, and clearing by name alone would let the second unmount delete the first's live hooks — trading a leak for a harder bug in which a live map loses its test surface at a distance. A first attempt compared against a name that did not exist. Inside the try/catch that guards these, the ReferenceError was swallowed and every delete silently did nothing — a leak fix that looks exactly like a leak fix and leaks. The guard that makes the assignment safe is the same guard that hides its failure, which is the argument for recording what was set rather than inferring it at teardown. --- .../cities-internet/connectivity-map.vue | 23 +++++++-- .../gospel-internet/src/components/GiGrid.vue | 19 ++++++- .../gospel-internet/src/components/GiMap.vue | 23 +++++++-- .../src/components/GiResources.vue | 18 ++++++- .../gospel-internet/src/components/GiTree.vue | 23 +++++++-- .../gospel-resources/resources-map.vue | 26 ++++++++-- .../cities-internet/cities-internet.js | 50 +++++++++---------- .../connectivity-list/index.html | 2 +- .../connectivity-map/index.html | 2 +- .../cities-internet/data-tables/index.html | 2 +- public/dx-maps/doxa-maps-spa/manifest.json | 24 ++++----- .../gospel-internet/board/board/index.html | 2 +- .../dx-maps/gospel-internet/board/index.html | 2 +- .../board/india-china/index.html | 2 +- .../board/language-tree/index.html | 2 +- .../board/platforms/index.html | 2 +- .../board/project-700/index.html | 2 +- .../gospel-internet/board/zero/index.html | 2 +- .../gospel-internet/gospel-internet.js | 48 +++++++++--------- .../gospel-resources/charts/index.html | 2 +- .../gospel-resources/data-tables/index.html | 2 +- .../gospel-dashboard/index.html | 2 +- .../gospel-resources/gospel-resources.js | 46 ++++++++--------- .../resources-list/index.html | 2 +- .../gospel-resources/resources-map/index.html | 2 +- public/dx-maps/manifest.json | 24 ++++----- 26 files changed, 228 insertions(+), 126 deletions(-) diff --git a/plugin-designs/cities-internet/connectivity-map.vue b/plugin-designs/cities-internet/connectivity-map.vue index 5a5f81f70..d62361533 100644 --- a/plugin-designs/cities-internet/connectivity-map.vue +++ b/plugin-designs/cities-internet/connectivity-map.vue @@ -1,4 +1,11 @@ - + - + - + \n\n\n" + "script": "\n\n\n" } }, { @@ -144,7 +144,7 @@ "scriptUrl": "./cities-internet/cities-internet.js", "embed": { "iframe": "", - "script": "\n\n\n\n\n" + "script": "\n\n\n\n\n" } }, { @@ -160,7 +160,7 @@ "scriptUrl": "./cities-internet/cities-internet.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" } } ] @@ -615,7 +615,7 @@ "bundle": "gospel-internet", "scriptUrl": "./gospel-internet/gospel-internet.js", "output": "dx-maps/gospel-internet/gospel-internet.js", - "integrity": "sha384-OElwejLTJl1zxmuX/v/vFMaPWX6tb6lYh3g38kfQnSEgcBwrdkfUztFU2NJwO/Tf", + "integrity": "sha384-qMLfS8j749HVbpr1fMCVBByc5XB/bxVlbexpzCS5H4E9xXsRCch0+Ai/G+rOeRvb", "elements": [ "gospel-internet-board" ], @@ -635,7 +635,7 @@ "scriptUrl": "./gospel-internet/gospel-internet.js", "embed": { "iframe": "", - "script": "\n\n\n\n\n" + "script": "\n\n\n\n\n" }, "instances": [ { @@ -742,7 +742,7 @@ "bundle": "gospel-resources", "scriptUrl": "./gospel-resources/gospel-resources.js", "output": "dx-maps/gospel-resources/gospel-resources.js", - "integrity": "sha384-xXOOFAylJbFSv5NjEiAWzWF4nVDoed1ApuxGGLbpAx1sXz5LSza/3VkjbW0iqEhB", + "integrity": "sha384-3e/mKVPmXPDFPrg9kUi0KjYEKK0xYGDNm4lxuNdI8/l5bnidjaX+YFkIVVjEPlji", "elements": [ "gospel-resources-map" ], @@ -765,7 +765,7 @@ "scriptUrl": "./gospel-resources/gospel-resources.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" } }, { @@ -781,7 +781,7 @@ "scriptUrl": "./gospel-resources/gospel-resources.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" } }, { @@ -797,7 +797,7 @@ "scriptUrl": "./gospel-resources/gospel-resources.js", "embed": { "iframe": "", - "script": "\n\n\n\n\n" + "script": "\n\n\n\n\n" } }, { @@ -813,7 +813,7 @@ "scriptUrl": "./gospel-resources/gospel-resources.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" } }, { @@ -829,7 +829,7 @@ "scriptUrl": "./gospel-resources/gospel-resources.js", "embed": { "iframe": "", - "script": "\n\n\n\n\n" + "script": "\n\n\n\n\n" } } ] diff --git a/public/dx-maps/gospel-internet/board/board/index.html b/public/dx-maps/gospel-internet/board/board/index.html index 940964ae8..bf9806544 100644 --- a/public/dx-maps/gospel-internet/board/board/index.html +++ b/public/dx-maps/gospel-internet/board/board/index.html @@ -36,7 +36,7 @@ - + - + - + - + - + - + - + - + - + - + - + - + \n\n\n" + "script": "\n\n\n" } }, { @@ -144,7 +144,7 @@ "scriptUrl": "./cities-internet/cities-internet.js", "embed": { "iframe": "", - "script": "\n\n\n\n\n" + "script": "\n\n\n\n\n" } }, { @@ -160,7 +160,7 @@ "scriptUrl": "./cities-internet/cities-internet.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" } } ] @@ -615,7 +615,7 @@ "bundle": "gospel-internet", "scriptUrl": "./gospel-internet/gospel-internet.js", "output": "dx-maps/gospel-internet/gospel-internet.js", - "integrity": "sha384-OElwejLTJl1zxmuX/v/vFMaPWX6tb6lYh3g38kfQnSEgcBwrdkfUztFU2NJwO/Tf", + "integrity": "sha384-qMLfS8j749HVbpr1fMCVBByc5XB/bxVlbexpzCS5H4E9xXsRCch0+Ai/G+rOeRvb", "elements": [ "gospel-internet-board" ], @@ -635,7 +635,7 @@ "scriptUrl": "./gospel-internet/gospel-internet.js", "embed": { "iframe": "", - "script": "\n\n\n\n\n" + "script": "\n\n\n\n\n" }, "instances": [ { @@ -742,7 +742,7 @@ "bundle": "gospel-resources", "scriptUrl": "./gospel-resources/gospel-resources.js", "output": "dx-maps/gospel-resources/gospel-resources.js", - "integrity": "sha384-xXOOFAylJbFSv5NjEiAWzWF4nVDoed1ApuxGGLbpAx1sXz5LSza/3VkjbW0iqEhB", + "integrity": "sha384-3e/mKVPmXPDFPrg9kUi0KjYEKK0xYGDNm4lxuNdI8/l5bnidjaX+YFkIVVjEPlji", "elements": [ "gospel-resources-map" ], @@ -765,7 +765,7 @@ "scriptUrl": "./gospel-resources/gospel-resources.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" } }, { @@ -781,7 +781,7 @@ "scriptUrl": "./gospel-resources/gospel-resources.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" } }, { @@ -797,7 +797,7 @@ "scriptUrl": "./gospel-resources/gospel-resources.js", "embed": { "iframe": "", - "script": "\n\n\n\n\n" + "script": "\n\n\n\n\n" } }, { @@ -813,7 +813,7 @@ "scriptUrl": "./gospel-resources/gospel-resources.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" } }, { @@ -829,7 +829,7 @@ "scriptUrl": "./gospel-resources/gospel-resources.js", "embed": { "iframe": "", - "script": "\n\n\n\n\n" + "script": "\n\n\n\n\n" } } ]