J
jj
Hi
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
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