[Mono-bugs] [Bug 551742] UIImagePicker leaks memory when using camera

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Nov 2 14:18:45 EST 2009


User gnorton at novell.com added comment

Geoff Norton <gnorton at novell.com> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

--- Comment #3 from Geoff Norton <gnorton at novell.com>  2009-11-02 12:18:42 MST ---

  There are a few different things at play here.  First UIImagePickerView
appears to be a singleton under the hood, and keeps some things around for you
to reuse it in the future, please see:


Additionally, you're seeing further clicks coalesce some more memory because
you keep adding new eventhandlers to the TouchUpInsideEvent:

In FinishedLaunching you have:

            cameraButton.TouchUpInside += HandleCameraButtonTouchUpInside;

But in HandleCameraButtonTouchUpInside you have:

            cameraButton.TouchUpInside += delegate {};

So every time (after the first) that you click the button, you're adding
another event handler to the list, causing the anonymous delegate to be invoked
many times.

Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the mono-bugs mailing list