title: OutOfMemoryException When Creating a Large Bitmap in CF.NET
body: <p>My compact framework application creates a smooth-scrolling list by rendering all the items to a large bitmap surface, then copying that bitmap to an offset position on the screen so that only the appropriate items show.  Older versions only rendered the items that should appear on screen at the time, but this approach was too slow for a smooth scrolling interface.</p>
  
  <p>It occasionally generates an OutOfMemoryException when initially creating the large bitmap.  If the user performs a soft-reset of the device and runs the application again, it is able to perform the creation without issue.</p>
  
  <p>It doesn't look like this bitmap is being generated in program memory, since the application uses approximately the same amount of program memory as it did before the new smooth-scrolling methods.</p>
  
  <p>Is there some way I can prevent this exception?  Is there any way I can free up the memory I need (wherever it is) before the exception is thrown?  </p>