On Apr 20, 11:08 am, fadden <[email protected]> wrote:
> On Apr 18, 11:31 am, JP <[email protected]> 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 decides it's time to clean up.

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. Otherwise some more serious refactoring
is in order. Dynamic creation of memory at runtime is an expensive
operation. I avoid this to a large degree and need not worry about
garbage collection too much.

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