Skip to content

Instantly share code, notes, and snippets.

@zgmnkv
Created May 18, 2014 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zgmnkv/0e7ac1fe91c7d51d41a3 to your computer and use it in GitHub Desktop.
Save zgmnkv/0e7ac1fe91c7d51d41a3 to your computer and use it in GitHub Desktop.
import java.io.Serializable;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
public class PermGenTest {
public static void main(String[] args) {
//noinspection InfiniteLoopStatement
for (; ; ) {
ClassLoader classLoader = new ClassLoader() {};
Proxy.newProxyInstance(classLoader, new Class<?>[] { Serializable.class }, new InvocationHandler() {
@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
return null;
}
});
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment