Detecting? It's safe to assume that if there's any statics there's a permgen leak.
> Steps to use visualvm to profile memory for a standalone JBoss application:
> Allow visualvm to use 1024 Mb of RAM - in etc/visualvm.conf update -Xmx parameter to -J-Xmx1024m
And this is why I avoid all Java apps I can -- there is always a need for some memory tuning. C++, Lisp, Perl, Go, Python, even Javascript can all use all the memory in my computer have without any action on my part, only Java keeps having the problems with it.
Uh… PermGen? What year is it? This must be blog spam from the past.