Skip to content

Instantly share code, notes, and snippets.

@rolfbjarne
Created March 27, 2013 21:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rolfbjarne/ff29730f74a6b8f5bcb1 to your computer and use it in GitHub Desktop.
Save rolfbjarne/ff29730f74a6b8f5bcb1 to your computer and use it in GitHub Desktop.
void HandleDoWork (object sender, DoWorkEventArgs e)
{
while(running)
{
using (var pool = new NSAutoreleasePool ()) {
CreateBitmaps();
if(m_bitmapList.Count == 100)
{
while(m_bitmapList.Count > 0)
{
Console.WriteLine("dispose");
var temp = m_bitmapList[0];
m_bitmapList.RemoveAt(0);
temp.Dispose();
temp = null;
}
m_bitmapList.Clear();
m_bitmapList = new List<Bitmap>();
}
Console.WriteLine("new");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment