title: How to load an array with hundreds of UIImage instances without crashing the app because of the memory surge?
body: <p>I have an animation which consists of 250 frames. Each frame is 1080x1920 resolution and in PNG format. I need to take all these frames, animate them with <code>CAKeyframeAnimation</code> and render them on a video using <code>AVFoundation</code> tools.</p>
  
  <p>The issue arises when I try to create a <code>values</code> array for <code>CAKeyframeAnimation</code>. Initializing 250 FullHD images causes quite a big memory spike, which system detects and decides to kill the app.
  I've tried playing with <code>autoreleasepool</code> but it doesn't seem to help at all (no wonder, because <code>CAKeyframeAnimation</code> needs to hold on those images). </p>
  
  <p>The problem goes even further: I actually have 10 of such animations! And I need to quickly switch between them because the app allows to preview those animations dynamically (which is done via <code>AVSynchronizedLayer</code>) before exporting everything in a video file.</p>
  
  <p>So my question is: how can I load a big array of <code>UIImage</code> instances without  system killing the app because of a memory surge? Is there an asynchronous way of loading them?</p>