mail-archives/mono-bugs/2009-November/094510.html

102 строки
4.6 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Mono-bugs] [Bug 551742] UIImagePicker leaks memory when using camera
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:mono-bugs%40lists.ximian.com?Subject=%5BMono-bugs%5D%20%5BBug%20551742%5D%20UIImagePicker%20leaks%20memory%20when%20using%0A%09camera&In-Reply-To=bug-551742-28286%40http.bugzilla.novell.com/">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="094466.html">
<LINK REL="Next" HREF="094464.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Mono-bugs] [Bug 551742] UIImagePicker leaks memory when using camera</H1>
<B>bugzilla_noreply at novell.com</B>
<A HREF="mailto:mono-bugs%40lists.ximian.com?Subject=%5BMono-bugs%5D%20%5BBug%20551742%5D%20UIImagePicker%20leaks%20memory%20when%20using%0A%09camera&In-Reply-To=bug-551742-28286%40http.bugzilla.novell.com/"
TITLE="[Mono-bugs] [Bug 551742] UIImagePicker leaks memory when using camera">bugzilla_noreply at novell.com
</A><BR>
<I>Mon Nov 2 14:18:45 EST 2009</I>
<P><UL>
<LI>Previous message: <A HREF="094466.html">[Mono-bugs] [Bug 551742] UIImagePicker leaks memory when using camera
</A></li>
<LI>Next message: <A HREF="094464.html">[Mono-bugs] [Bug 551745] New: System.ServiceModel.Channels.HttpsTransportBindingElement throws NotImplementedException
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#94510">[ date ]</a>
<a href="thread.html#94510">[ thread ]</a>
<a href="subject.html#94510">[ subject ]</a>
<a href="author.html#94510">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE><A HREF="http://bugzilla.novell.com/show_bug.cgi?id=551742">http://bugzilla.novell.com/show_bug.cgi?id=551742</A>
User <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">gnorton at novell.com</A> added comment
<A HREF="http://bugzilla.novell.com/show_bug.cgi?id=551742#c3">http://bugzilla.novell.com/show_bug.cgi?id=551742#c3</A>
Geoff Norton &lt;<A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">gnorton at novell.com</A>&gt; changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
--- Comment #3 from Geoff Norton &lt;<A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">gnorton at novell.com</A>&gt; 2009-11-02 12:18:42 MST ---
Mike,
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:
<A HREF="http://stackoverflow.com/questions/1189707/memory-leak-problems-with-uiimagepickercontroller-in-iphone">http://stackoverflow.com/questions/1189707/memory-leak-problems-with-uiimagepickercontroller-in-iphone</A>
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: <A HREF="http://bugzilla.novell.com/userprefs.cgi?tab=email">http://bugzilla.novell.com/userprefs.cgi?tab=email</A>
------- You are receiving this mail because: -------
You are the QA contact for the bug.
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="094466.html">[Mono-bugs] [Bug 551742] UIImagePicker leaks memory when using camera
</A></li>
<LI>Next message: <A HREF="094464.html">[Mono-bugs] [Bug 551745] New: System.ServiceModel.Channels.HttpsTransportBindingElement throws NotImplementedException
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#94510">[ date ]</a>
<a href="thread.html#94510">[ thread ]</a>
<a href="subject.html#94510">[ subject ]</a>
<a href="author.html#94510">[ author ]</a>
</LI>
</UL>
<hr>
<a href="http://lists.ximian.com/mailman/listinfo/mono-bugs">More information about the mono-bugs
mailing list</a><br>
</body></html>