ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
50.47k stars 13.53k forks source link

[TRAINING] bug: ion-input retained in memory after removed from DOM #29402

Closed liamdebeasi closed 2 weeks ago

liamdebeasi commented 2 weeks ago

[!IMPORTANT] The contents of this thread are for training purposes only and do not represent an actual memory leak in Ionic Framework. If you think you've found a bug in Ionic, please file an issue.

Prerequisites

Ionic Framework Version

v8.x

Current Behavior

ion-input is retained in memory even after being removed from the DOM.

Expected Behavior

I expect ion-input to not be retained in memory by Ionic Framework after it is removed from the DOM.

Steps to Reproduce

  1. Clone the reproduction sample.
  2. Run npm install in the core directory to install dependencies.
  3. Run npm run start to start the Stencil dev server.
  4. Navigate to http://localhost:3333/src/components/input/test/basic
  5. Fill out the form.
  6. Click "Submit". The input will be removed from the DOM, but it will still be retained in memory.

Code Reproduction URL

https://github.com/liamdebeasi/framework-training-leak-1

Ionic Info

Ionic v8.0.1

Additional Information

No response