You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is observed that this function is called every time the songs.value is set
the forEach will setTimeout on every el children, and doesn't clearTimeout, which will create thousands of thousands closure and callbacks, and leads to memory leak.
This replacement of array is common in vue design.
So, in theory, any update frequency less than 2s will cause the memory go insane eventually. In fact the intervals is never get clearInterval either, so that is another leak point.
In conclusion, auto-animate doesn't work with changing items (for a long runtime)
The text was updated successfully, but these errors were encountered:
Assume this template:
In javascript, this triggers every second.
It is observed that this function is called every time the songs.value is set
the
forEach
will setTimeout on everyel
children, and doesn't clearTimeout, which will create thousands of thousands closure and callbacks, and leads to memory leak.This replacement of array is common in vue design.
So, in theory, any update frequency less than 2s will cause the memory go insane eventually. In fact the
intervals
is never get clearInterval either, so that is another leak point.In conclusion, auto-animate doesn't work with changing items (for a long runtime)
The text was updated successfully, but these errors were encountered: