npm install
npm run serve
- Open base url of project (printed in console)
- Click on "Go to Test Component"
- Click on Home
- Open developer tools and take a heap snapshot
- Filter for "Objects retained by detached DOM nodes"
- See there are detached elements, e.g. a paragraph element with id = testParagraph.
- Manually trigger garbage collection
- Take another heap snapshot and filter for "Object retained by detached DOM nodes" again
- See that e.g. the paragrpah is still being retained => paragraph element has leaked (it is detached from the DOM but is not being garbage collected)
- Go to FunctionalComponent.vue to line 4 and change the parameter for functional to "false"
- Redo steps 1 - 8
- See that there are not detached elements (even without manually garbage collecting) => all elements have been properly garbage collected