I have a map of format Map stored in a file. This file has over 100,000 records.
The value of each entry is nearly 10k.
I load 1000 records into a map in memory , process them ,then clear the map and load the next 1000 records.
My question is :
Since the strings are stored in String pool which is in permgen memory area , when i clear the map will the Strings be garbage collected ?
Incase if they are not garbage collected is there any way to force them to be garbage collected?
Is there any guarantee that if the program is running out of memory , JVM would clean the permGen memory before throwing OutOfMemory Exception ?