@Ralf

that doesn't look suspicious at all. I guess we'll have to wait for
Robert to chim in.

On Jan 27, 7:45 pm, Mario Zechner <[email protected]> wrote:
> Nice, there goes another myth. I read about recycling the MotionEvent
> at a couple of places on the net. Thanks for clearing that up!
>
> I wonder however why it is exposed as a public method. Additionally,
> the semantics of onTouch allow me to return a boolean indicating that
> i consumed the event (or not). So my reasoning was that in case i
> return true from onTouch and recycle the event, everything should work
> out fine. Maybe add to the documentation that it should never ever be
> called by an application?
>
> Anyways, thanks again!
> (if you have the time, seeing as you are obviously responsible for
> this part of the framework, could you have a look at the other
> discussion on multi-touch over 
> herehttp://groups.google.com/group/android-developers/browse_thread/threa...
> :)
>
> On Jan 27, 7:17 pm, Dianne Hackborn <[email protected]> wrote:
>
> > On Tue, Jan 26, 2010 at 4:20 PM, Mario Zechner 
> > <[email protected]>wrote:
>
> > > That being said, there shouldn't be any problems with touch events on
> > > devices running android >= 2.0 as they fixed the event flood problem
> > > in that version. I couldn't see any problem in my projects that make
> > > heavy use of the touch screen on my droid. There seems to be a small
> > > memory leak in the onTouch method if you don't call event.recycle
> > > before exiting the onTouch method.
>
> > Oh my ghod...  are you saying you are calling recycle() on the MotionEvent
> > that is -given- to you in onMotionEvent()?  Please please please do not do
> > that, you do not own the event, and you are going to cause nasty problems if
> > you recycle it from the caller that does own it.
>
> > --
> > Dianne Hackborn
> > Android framework engineer
> > [email protected]
>
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support, and so won't reply to such e-mails.  All such
> > questions should be posted on public forums, where I and others can see and
> > answer them.
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to