title: What is CG Raster Data?
body: <p>I'm trying to find another memory leak in my code, and I can't seem to figure out what CG Raster Data is.  While going through the VM Tracker with automatic snapshots enabled, the CG Raster Data seems to be the only part that increases.  These also increase steadily without the allocations increasing.  </p>
  
  <p>I'm not entirely sure what the CG Raster Data is, nor how I would fix it, but at this point the increasing footprint eventually causes a memory error and crash, so it's not good!  I do my own text rendering (using CoreText), so I'm thinking that has something to do with it.  I also am loading pictures?</p>
  
  <p>Below is an image of the footprint:
  <img src="https://i.stack.imgur.com/aPn3B.png" alt="Peaks in the allocations when the pages load (the app loads pages with images and text discretely), the dirty memory always increases though."></p>
  
  <p><strong>UPDATE:</strong>  This problem still persists, but interestingly enough I can correlate it to a leak within UIFoundations to something called "NSConcreteGlyphGenerator."  It seems to happen only when I call a "boundingRectWithSize:" method on an attributed string in the CoreText method that actually draws.  The line, specifically, is:</p>
  
  <pre><code>[displayString boundingRectWithSize:CGSizeMake( self.frame.size.width, self.frame.size.height ) options:0 context:nil];
  </code></pre>
  
  <p>Slowly tracking it down...</p>