Hi,

Anybody ever observed the following behavior when trying to download an image 
from the internet?
The following code:

private Bitmap LoadThumbnail(Uri eventImageUri)
{
    Bitmap result = null;

    try
    {

        var request = HttpWebRequest.Create(eventImageUri);
        var response = request.GetResponse();

        if (response.ContentLength != 0)
        {
            Stream responseStream = response.GetResponseStream();
            result = BitmapFactory.DecodeStream(responseStream);

            responseStream.Close();
        }
    }
    catch (Exception e)
    {
        DeviceContext.Current.Log.WriteError(e);
    }

    return result;
}

Causes the GC to start collecting chunks of 2K and the app to stop responding. 
I'm not doing doing anything weird, so I can't really relate to the problem I'm 
seeing :S

LOGCAT OUTPUT
======================

D/dalvikvm( 1244): GC_EXPLICIT freed 2K, 56% free 3226K/7175K, external 
5598K/9015K, paused 54ms
D/dalvikvm( 1244): GC_EXPLICIT freed 2K, 56% free 3226K/7175K, external 
5598K/9015K, paused 46ms
D/dalvikvm( 1244): GC_EXPLICIT freed 2K, 56% free 3226K/7175K, external 
5598K/9015K, paused 53ms
D/dalvikvm( 1244): GC_EXPLICIT freed 2K, 56% free 3226K/7175K, external 
5598K/9015K, paused 49ms
D/dalvikvm( 1244): GC_EXPLICIT freed 2K, 56% free 3226K/7175K, external 
5598K/9015K, paused 54ms
D/dalvikvm( 1244): GC_EXPLICIT freed 2K, 56% free 3226K/7175K, external 
5598K/9015K, paused 48ms
D/dalvikvm( 1244): GC_EXPLICIT freed 2K, 56% free 3226K/7175K, external 
5598K/90....

Kind regards,

Willem Meints

_______________________________________________
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to