Skip to content

Instantly share code, notes, and snippets.

@rolfbjarne

rolfbjarne/foo.cs Secret

Created Mar 27, 2013
Embed
What would you like to do?
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