On Apr 17, 2:01 pm, petunio <[email protected]> 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 won't be in the root set.

Does "do some stuff with buff[]" involve passing buff to other
functions?  If so, are you sure those other functions aren't hanging
on to it?

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