vuejs / router

🚦 The official router for Vue.js
https://router.vuejs.org/
MIT License
3.95k stars 1.19k forks source link

The onInput event of the input element causes memory leaks. #2388

Closed tianwangwen closed 1 month ago

tianwangwen commented 1 month ago

Reproduction

https://play.vuejs.org/#eNrtVe9v2zYQ/Vc4dYBlzKZip+sHTTGSFcXSYdmCbtiXuhhkibaZSCRBUo4Nw//7HqmfbtJi+94EtqW7d8d3947kMShTLuiDCeKAl0pqS44k0yy17EYpciJrLUsy2lVstBQdQMvKMt15aVQbeoiLbX2pUrSOX4ouc4jPeCkIoZVhYR1ev5eyEjYcvULYaBxMgiYc/BLLSlUgfuGAyXa2uGVFId1i3yURXr1Z+R88GKul2CzeVlozYWvORKV2GydR4yPHI/neO+i6Kop7OMnp5NNEdZ5EpLs24QfP8jcuHomVV8sgWgaLXySeya0sWRL1/i9GpCtYurAb9/YsLonaNROnzXmuvzl7IlGDa9xJ1DUG/ap7Se0Lit6xUurDLTcWP5PGWOcdKj3t1Oz0dAX6pVtRW0OjbCu7K+gM11m6EWB7D82kMI0omlydcQmPrrxtTTN+iXs4njiIjzYx+Vi36FirS0bRCMVJUBIQPu7Jn3zUEOj1OEf3NdTwT/g+YTTR2mHRz+cx592kuMf7dMPILIkGZi5UZYk9KIZZsGyPSSDX3oh3Kd67JwxHn4Tspmup4Qw51poQLnK2H+OHFGgEouNHdoDb27tIFHisoRhmMvVvCG8m2w1Oy6l9GkyQkygxmebKEsNs5bZBv+/ZekKkuHNblOWfnQ7Y3V5TRw2KAht+/ITGdfgwHJMr7Dm3sgPRXVpUDFCBZt9onR7C2QX+xnTNiyK8g0ZUpyKXZThGHidCu0bTLMQ2OVHaEhWvuWB/KMsBqqdIpCWD0ApizMDR5cDu9+W5zXI2nv9N0vmZpN9Eekmk/y9EzX5apgp3kRSQwkeha95hlkFcc3K2/oxy5mWwtVaZOIoqoR43FHs56hHXr+klvUALjR1YKTPldKXlk8HzA7I3J8MyuAYoytnOSlmYaar4l5Z4Brx+Q9/QWVTwVYTskdfW53apoeoJZVqD9q/55rMi3fHDC6abjp0Vm+KKe/rV26yuWEc027Ls8QX7g8GQOcr3mqG6HRsUZ1O9YRhJ53735+/+BOqcpcyrAuivOD8wI4vKcaxhP1ciB+0BzrN97zXjYvOXebe3TJi2KEfUd8PjvZBvv1J6T/eSvh500dhDwQzNjLvjcFlOiLsJ67iV1DnTMZmrPQFZnpNXmNafnKtEOi6mK2mtLGMyu1B7b1dpnoNsZ/FnCdKSBUnJD/j4xE10wda4JIbI7Xy4cp++J5Bl2YBATC7wP28yoJx/dky7FqGYS/ojnc2D07+RjzOR

Steps to reproduce the bug

  1. Open this Vue.js Playground using Chrome,
  2. Switch back and forth between the Home and About pages, and the memory usage should be normal at this point. But, If you enter some random content into the input box on the Home page and then switch to the About page, the memory allocated to the Home page will not be released.

Note: I have added 10,000 divs below to make the unreleased memory more apparent.

WeChate42d158789544b9456f186689eccd9d2

Expected behavior

Normal memory release

Actual behavior

Memory has not been released.

Additional information

No response

edison1105 commented 1 month ago

duplicate of https://github.com/vuejs/core/issues/11552

posva commented 1 month ago

Duplicate of https://github.com/vuejs/core/issues/11552