Hi mono support,
I'm dynamically loading a image. The function below can be executed 3 times
be for the log box reports an error (See below). How can I recover MV space.
I tried GC.Collect() and GC finalizerwait... but with no effect.
IDE: Windows Mono for Android 4.0.6
private void showImage(String map)
{
if (spTN.SelectedItemPosition == 0)
{
image.SetImageBitmap(null);
return;
}
if (String.IsNullOrEmpty(map))
{
image.SetImageBitmap(null);
spTN.SetSelection(0);
return;
}
try
{
for (int i = 0; i < aasTN.Count; i++ )
{
if (aasTN.GetItem(i).ToString().ToLower() ==
map.ToLower())
{
spTN.SetSelection(i);
String images = IO.Path.Combine(bl.FileRoot,
"images");
String[] matches = IO.Directory.GetFiles(images, map
+ ".*");
System.Diagnostics.Debug.WriteLine(matches[0]);
Bitmap bitmap =
BitmapFactory.DecodeFile(matches[0]);
image.SetImageBitmap(bitmap);
return;
}
}
image.SetImageBitmap(null);
spTN.SetSelection(0);
}
catch (Exception e)
{
Log.Error("Error reading image", e.ToString());
}
}
}
The Log states that the MV is Full, See image:
http://mono-for-android.1047100.n5.nabble.com/file/n5634404/MV-is-Full.jpg
--
View this message in context:
http://mono-for-android.1047100.n5.nabble.com/MV-full-error-tp5634404p5634404.html
Sent from the Mono for Android mailing list archive at Nabble.com._______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid