I am using tomcat6 and java on Debian server. Does anyone know of some good and reliable garbage collection strategies for PermGen?
Asked
Active
Viewed 150 times
0
-
2What are you asking? Are you implementing your own GC? – Dave Newton Jun 27 '12 at 00:33
-
2Have you tried `System.exit`? – Hot Licks Jun 27 '12 at 00:37
1 Answers
0
If you have evidence that you have a problem with too many loaded classes, and, especially, if you have a problem with lots of "one-off" classes that may be referenced once and never used again, you should learn about custom class loaders.
In order to garbage-collect a class, all of the objects of the class must be collectable, and there must be no references to the class other than from the loading class loader (which must also meet standard requirements for "collectability"). Then the class and it's loading class loader will be collected together.

Hot Licks
- 47,103
- 17
- 93
- 151