-
-
Save rolfbjarne/ff29730f74a6b8f5bcb1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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