This is actually an anti-Java way of doing things, but useful for
performance. :}

On Fri, Sep 18, 2009 at 2:21 PM, Rud <[email protected]> wrote:

>
> Hi,
>
> I found the same thing working with the sensors. My comments are at
> http://mysticlakesoftware.blogspot.com/. Its something I need to
> revisit because I am not sure I have retained a copy or references to
> the underlying value. Still adjusting to some of the Java way of doing
> things.
>
> Rud
> http://mysticlakesoftware.com/
>
> On Sep 18, 1:06 pm, Daber <[email protected]> wrote:
> > Hi,
> >
> > I've been experimenting with gsensors on dev phone and I think i found
> > something that needs explanation.
> >
> > The appliaction was comparing g readings with previously read values
> > in following manner
> > float[] mPrevious;
> >
> > float[] v  = event.values;
> >
> > // .. compare //
> >
> > mPrevious = v;
> >
> > but after while all comparisions were  equal.
> >
> > It seems that event reuses float array object to provide new data in
> > the old array after some time (mPrevious and event.values is the same
> > object).
> >
> > Now here is The question:
> >  Who has object "ownership"  -the gsensor framework and i have to make
> > a copy
> >  Me - and this is a bug
> >
> > BR,
> >
> > Michał Dąbrowski
> >
>


-- 
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