On Apr 20, 1:17 pm, JP joachim.pfeif...@gmail.com wrote:
Sure, however... if memory is released each time within the few
calls (as OP describes), the program might get through with whatever
it does. This assumes this function is not called in a loop or at a
high rate generally speaking.
On Apr 17, 2:01 pm, petunio juanjosegilmen...@hotmail.com wrote:
static void test(int k)
{
byte [] buff = new byte[k];
//do some stuff with buff[]
buff=null;
}
You shouldn't need to set buff to null. When the function returns
the locals go out of scope and
On Apr 18, 11:31 am, JP joachim.pfeif...@gmail.com wrote:
You may get this resolved by calling the garbage collector right
there; system.gc() after you dereference the byte array with
buff=null;
The garbage collector will produce the same result whether it's called
explicitly or the VM
On Apr 20, 11:08 am, fadden fad...@android.com wrote:
On Apr 18, 11:31 am, JP joachim.pfeif...@gmail.com wrote:
You may get this resolved by calling the garbage collector right
there; system.gc() after you dereference the byte array with
buff=null;
The garbage collector will produce
Try running that in DDMS and watching how often the GC is called.
--
Android Academy: http://www.androidacademy.com
On Apr 17, 10:01 pm, petunio juanjosegilmen...@hotmail.com wrote:
Hi
I know this is more a java question, but I have been in many java
forums, and the theory seems to
You may get this resolved by calling the garbage collector right
there; system.gc() after you dereference the byte array with
buff=null;
On Apr 17, 2:01 pm, petunio juanjosegilmen...@hotmail.com wrote:
Hi
I know this is more a java question, but I have been in many java
forums, and the
You really should not be forcing the garbage collector to run like this, and
there should be no need to do so.
On Sat, Apr 18, 2009 at 11:31 AM, JP joachim.pfeif...@gmail.com wrote:
You may get this resolved by calling the garbage collector right
there; system.gc() after you dereference the
The garbage collector will take care of freeing it, unless there is
something else holding a reference to it (for example inside of your do
stuff part). You don't need to set buff to null at the end, either.
On Fri, Apr 17, 2009 at 2:01 PM, petunio juanjosegilmen...@hotmail.comwrote:
Hi
I
8 matches
Mail list logo