Put in order · Vue.js course · Module 9: Composables & VueUse
How a Memory Leak Happens in a Composable
Arrange the steps of how a memory leak happens in useLeakyTimer:
Items to put in order
- The memory cannot be freed - a leak
- The component is unmounted
- The composable starts setInterval in onMounted
- The timer keeps running and holds a reference to the state
You can check the correct answer by solving this task in the CodeWorlds game.