Out of memory error in java
- by Anuj
I am getting OutOfMemoryError: java heap
snippets of the method:
{
// step 1: I am creating a 2 dim array
int totalCombination = (int) Math.pow(2.0, (double) vowelCount);
here vowelCount > 10
// step2: initializing my array
// step3: and using that array
}
My Question:
each time this method is called, that array is getting created.
Is it possible that the array is not getting released .
In windows taskmanager i can see memory used by java is purely incremental.
So it is not that at a point heap size is less, but memory is repetitively used and not released somehow.
Please let me know if you need more detal.
Please help to debug the error.
Anuj