title: Why is memory stacking up when using gifs in Ursina Engine?
body: <p>I want to load a gif in ursina engine using the Animation class, it works flawlessly but when I want to reassign the Animation to another gif the memory stacks up like if I opened another gif. I tried to delete the instance and then recreate the gif but the memory keeps stacking up, also I tried to force a garbage collection but it doesn't work either.
  What can I do?
  The code is something like this:</p>
  <pre><code>from ursina import *
  from ursina.prefabs.animation import Animation
  import gc
  
  app = Ursina()
  FC={&quot;FC&quot;:80}
  monitor = Animation(&quot;monitor\gifs\monitor-%d.gif&quot; % (FC[&quot;FC&quot;]),loop=False)
  monitor.enable()
  
  
  def recreate_monitor():
      global monitor
      monitor = Animation(&quot;monitor\gifs\monitor-%d.gif&quot; % (FC[&quot;FC&quot;]),loop=False)
      monitor.enabled = True
  
  def refresh_monitor():
      global monitor
      monitor.sequence.start()
  
  def update():
      global monitor
      if not monitor:
          create_monitor()
      else:
          if monitor.sequence.finished:
              if FC[&quot;FC&quot;] != 80:
                  monitor.remove_node()
                  del monitor
                  print(&quot;DATA RECOLLECTED: &quot;, gc.collect())
                  create_monitor()
              else:
                  refresh_monitor()
  
  def input(key):
      if key == &quot;space&quot;:
          FC[&quot;FC&quot;] = 100
  
  
  app.run()
  </code></pre>