Encountered an error in Vue3 development: memory leak problem handling

Business scene

When I finished developing a Vue3 project, packaged it and ran it, I found that the browser reported an error:
it means memory leak
insert image description here

How to troubleshoot the source of the problem

For the error report after packaging, it is impossible to find the error report directly. You need to add a sourcemap:true attribute in the vite.config.ts file,
insert image description here
and then click on the error report, so that you can jump to the error report.
And here I appear The memory leak can be seen in the figure below. Due to the logic causing an infinite loop, after handling the logic here, it will run normally in the end.
insert image description here

Guess you like

Origin blog.csdn.net/m0_46627407/article/details/126632484