[android-developers] Re: Android Camera Garbage Collection.

2009-05-28 Thread Mike Hearn
If you want to distribute the app to existing Android phone owners, you're out of luck. You'll have to file a bug. How does the Camera app itself handle this situation? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[android-developers] Re: Android Camera Garbage Collection.

2009-05-28 Thread Robert Green
Have you guys tested it previewing to a surfaceview instead? I'm wondering if it doesn't behave differently there. On May 28, 12:25 am, karan parikh karan.n...@gmail.com wrote: Hey All,       @Robert: Yes. I am talking about the same function call. If you read the documentation for that, It

[android-developers] Re: Android Camera Garbage Collection.

2009-05-28 Thread Robert Green
Karan, Option 1 is no good - only stubs are in Android.jar for things like that. Most of that code is native. You'd need a custom build of Android. If it was just an issue of java, you could write your own code but since it's native, you're right, portability is the problem. Option 2 is no

[android-developers] Re: Android Camera Garbage Collection.

2009-05-28 Thread Bo
On May 28, 11:54 pm, Robert Green rbgrn@gmail.com wrote: Karan, Option 1 is no good - only stubs are in Android.jar for things like that.  Most of that code is native.  You'd need a custom build of Android.  If it was just an issue of java, you could write your own code but since it's

[android-developers] Re: Android Camera Garbage Collection.

2009-05-28 Thread karan parikh
Hey, I have created the issue. It is Issue number 2794. Please look at it and add extra comments if necessary. I agree with Bo, It is not possible to do the option number 4. I think there are some changes that are required to be incorporated in the jar file or provide us with a new API.

[android-developers] Re: Android Camera Garbage Collection.

2009-05-27 Thread karan parikh
Hey All, @Robert: Yes. I am talking about the same function call. If you read the documentation for that, It says that a new copy is assigned everytime. You could also verify it with the allocation tracker. It is assigning that memory multiple times. @Tom: Yes a new object reference is

[android-developers] Re: Android Camera Garbage Collection.

2009-05-26 Thread Robert Green
Are you talking about the method Camera.PreviewCallback.onPreviewFrame (byte[] arg0, anrdoid.hardware.Camera arg1) ? Is it allocating a new byte[] for every call? I would think it would keep its same byte[] and reuse it for each call. Posting more code may help. Thanks On May 25, 9:30 pm,

[android-developers] Re: Android Camera Garbage Collection.

2009-05-26 Thread Tom Gibara
I'm pretty sure I have looked into this in the past and found that a different object reference is supplied on each call. Tom. 2009/5/26 Robert Green rbgrn@gmail.com Are you talking about the method Camera.PreviewCallback.onPreviewFrame (byte[] arg0, anrdoid.hardware.Camera arg1) ? Is

[android-developers] Re: Android Camera Garbage Collection.

2009-05-26 Thread Bo
I would like to know that as well. According to the log, garbage collector is freeing the byte array on every callback. It's a big waste of time. Best, Bo On May 26, 10:30 am, Karan Parikh karan.n...@gmail.com wrote: Hey All,       I am developing acameraapplication , where the frame rate is