How to delete an animation object with LV_ANIM_REPEAT_INFINITE?

Here without using lv_anim_set_ready_cb(), where is a good place to delete the animation object and its allocated memory?

v8 or v9 ?

v8.3. Thanks for looking.

Try this Issue stopping an animation (LVGL 8) - How-to - LVGL Forum

Nice information. Actually, my question is where/when is a suitable place to call the function lv_anim_del(). Without LV_ANIM_REPEAT_INFINITE, the callback function of lv_anim_set_ready_cb() is a nature place to call lv_anim_del(). But with LV_ANIM_REPEAT_INFINITE, there is no such a callback function that can be triggered by the animation.

Maybe i dont understand you. 1. Infinite say you can del it anytime …
2. I mean too can change infinite to normal on the fly exist then on end is cb ready used… Primary you require pointer to anim.

Sorry for late response. Yes, in some case, I do del the INFINITE animation if I can click a button, for example. But in my project, I do not have such a definite way in most cases.
For instance, I create an INFINITE animation after creating a new screen. The animation will display on the screen continuously. I tried to del the animation in the LV_EVENT_DELETE handler of the screen. But its lv_anim_del() seems doing nothing there.
However, if the animation is not INFINITE, lv_anim_del() can really delete its memory in its lv_anim_set_ready_cb() callback.