https://bugzilla.novell.com/show_bug.cgi?id=670294

https://bugzilla.novell.com/show_bug.cgi?id=670294#c21


--- Comment #21 from Mohamed Azmy <a...@ebseg.com> 2011-05-21 01:40:53 UTC ---
Guys,

What i am doing now to dispose of the memory is to call the below function on
any uiviewcontroller.view 

This is clearing some memory but not all 

void DisposeAllSubViews (UIView CurrView)
{
     for (int i = CurrView.Subviews.Length-1; i >= 0; i--)
     {
    if (CurrView.Subviews[i].ToString().Contains("UITextView"))
         Log("Will not Dispose of UITextView");
    else if (CurrView.Subviews[i].ToString().Contains("UIImageView"))
    {
        UIImageView MyImgView = (UIImageView)CurrView.Subviews[i];
        if (MyImgView.Image != null )
        {
        MyImgView.Image.Dispose();
        MyImgView.Image = null;
            Log("An Image is Disposed");
        }
        }
        else
       DisposeAllSubViews (CurrView.Subviews[i]);
     }
     CurrView.RemoveFromSuperview ();
     CurrView.Dispose ();
     CurrView = null;
}

any better ideas ??

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist  -  mono-bugs@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to