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 contradict the real thing... > > I have a very simple function that creates memory, do something with > it, and returns: > > static void test(int k) > { > byte [] buff = new byte[k]; > > //do some stuff with buff[] > > buff=null; > > } > > After a few calls to this function, it runs out memory > In C++ I would use delete at the end, and here in java I've been told > that GC takes care of it, but it seems that it does not > Am I doing something wrong? how can I free this temp memory after I > have used it? > > many thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---