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
Animations need to be held in a reference so that they are not gc'ed. I have argued against that behavior in #16221, but as long as we keep it, we could at least add an internal flag tracking whether the animation has been started (I have not checked whether it would be best for this to go in _start or _init_draw or elsewhere), and emit a warning in __del__ if the animation is gc'ed without ever being started, to help confused users (https://discourse.matplotlib.org/t/could-animation-be-triggered-only-when-an-onclick-event-in-silder/21534/2). (Unless someone can think of a reason to instantiate an animation and not start it... and even then we could add a flag i_really_meant_for_this_to_be_perhaps_gced_without_ever_running=True, but let's not get ahead of ourselves.)
Bug report
Bug summary
Animations need to be held in a reference so that they are not gc'ed. I have argued against that behavior in #16221, but as long as we keep it, we could at least add an internal flag tracking whether the animation has been started (I have not checked whether it would be best for this to go in
_start
or_init_draw
or elsewhere), and emit a warning in__del__
if the animation is gc'ed without ever being started, to help confused users (https://discourse.matplotlib.org/t/could-animation-be-triggered-only-when-an-onclick-event-in-silder/21534/2). (Unless someone can think of a reason to instantiate an animation and not start it... and even then we could add a flagi_really_meant_for_this_to_be_perhaps_gced_without_ever_running=True
, but let's not get ahead of ourselves.)Code for reproduction
N/A
Matplotlib version
print(matplotlib.get_backend())
):The text was updated successfully, but these errors were encountered: