Description
ProxyFactory.setHandler is deprecated and if used creates memory leaks!
We must create the ProxyClass without a default method handler and set it after we create a proxy instance of that very class:
Object proxyInstance = proxyClass.newInstance();
((ProxyObject) proxyInstance ).setHandler( ... )