Potential memory leak with lazy loaded img hidden early
Version
3.2.27
Reproduction link
Steps to reproduce
- Open memory panel in chrome devtools, run the garbage collection, then take heap snapshot,
- Click twice on the "toggle" button,
- Run the garbage collection and take a heap snapshot again, filter by "Detached"
- Click a pair number of times on the "toggle" button,
- Run the garbage collection and take a heap snapshot again, filter by "Detached"
What is expected?
The number of detached elements should not increase after each pair of clicks
What is actually happening?
The number of detached elements is increasing after each pair of clicks
- Changing the "loading" prop to "eager" seems to remove the problem
- Toggling the visibility of the img to false 1ms after mounted seem to also remove the problem
- Using "v-show" or "v-if" to hide the img seem to lead to a memory leak in both cases
Relates to https://github.com/quasarframework/quasar/issues/11804
@CamilleDrapier there is a memory leak issue for images with lazy loading in browsers based on chromium. See https://bugs.chromium.org/p/chromium/issues/detail?id=1213045 https://groups.google.com/a/chromium.org/g/blink-reviews/c/-NRWulyMsR8?pli=1