title: java.lang.OutOfMemoryError: PermGen space: java reflection
body: <p>I use java reflection in the code like this:</p>
  
  <pre><code>Method method = LogFactory.class.getDeclaredMethod("getContextClassLoader");
  method.setAccessible(true);
  ClassLoader classLoader = (ClassLoader)method.invoke(null);
  LogFactory.release(classLoader);
  </code></pre>
  
  <p>I use <code>jprofiler</code> can see many class like this <code>sun.reflect.GeneratedMethodAccessor11</code></p>
  
  <p>these classes are increased per call</p>
  
  <pre><code>sun.reflect.BootstrapConstructorAccessorImpl
  sun.reflect.NativeConstructorAccessorImpl
  sun.reflect.DelegatingConstructorAccessorImpl
  sun.reflect.DelegatingClassLoader
  </code></pre>
  
  <p>I think this is why PermGen space increase, how to clean these classes?</p>