Memory Leak

It means that the dynamically allocated heap memory in the program is not released or cannot be released for some reason, resulting in a waste of system memory, resulting in serious consequences such as slowing down the running speed of the program or even crashing the system.
Common Javascript memory leaks
1: Unexpected global variables You can add 'use strict' at the beginning of your JavaScript file
2: Missing timers and callbacks Frameworks and libraries like jQuery handle these things internally and guarantee no memory leaks
3: References outside the DOM All references need to be cleared when not in use.
4: Closures Use closures with caution

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325112642&siteId=291194637