Skip to content

Commit 2574af2

Browse files
authored
Merge pull request #2882 from moonmoonCL/fix/2.38.3-memoryleak
fix: cleartimeout memory leak (#1785)
2 parents b6b81ec + ea30dcc commit 2574af2

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

β€Žpackages/semi-foundation/navigation/subNavFoundation.tsβ€Ž

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ export default class SubNavFoundation<P = Record<string, any>, S = Record<string
5252
this._timer = null;
5353
}
5454

55-
destroy() {} // eslint-disable-line
55+
destroy() {
56+
this.clearDelayTimer();
57+
}
5658

5759
clearDelayTimer() {
5860
if (this._timer) {

β€Žpackages/semi-foundation/tooltip/foundation.tsβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ export default class Tooltip<P = Record<string, any>, S = Record<string, any>> e
115115
this._adapter.unregisterClickOutsideHandler();
116116
this.unBindResizeEvent();
117117
this.unBindScrollEvent();
118+
clearTimeout(this._timer);
118119
}
119120

120121
_bindTriggerEvent(triggerEventSet: Record<string, any>) {

0 commit comments

Comments
Β (0)