Fix memory leaks from Tippy.js instances and unremoved event listeners

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-09 13:54:38 +08:00
parent 9acd722929
commit 881dccc1ab
5 changed files with 48 additions and 21 deletions

View File

@@ -75,6 +75,8 @@ const {
conformanceFileName,
} = storeToRefs(conformanceStore);
let loadingTimerId = null;
// Created logic
(async () => {
isLoading.value = true;
@@ -109,7 +111,7 @@ const {
} catch (error) {
console.error("Failed to initialize conformance:", error);
} finally {
setTimeout(() => (isLoading.value = false), 500);
loadingTimerId = setTimeout(() => (isLoading.value = false), 500);
}
})();
@@ -124,6 +126,7 @@ onMounted(() => {
});
onBeforeUnmount(() => {
clearTimeout(loadingTimerId);
conformanceLogId.value = null;
conformanceFilterId.value = null;
conformanceLogCreateCheckId.value = null;