mulesoft/mule — pull request #759 by pablokraan (2014-06-09 12:51:15+00:00)
Title: MULE-7650: DynamicClassLoader leaking classloaders

Mvel's DynamicOptimizer contains a static field of type DynamicClassLoader. That field is initialized on creating a DynamicClassLoader that has the current thread's classloader as the parent. In our case, that classloader is a MuleApplicationClassLoader.
This means that when the app is undeployed, the reference to the app classloader will be still live because of this reference.
We are not using dynamic optimization, but that optimizer is created/initialized before we configure the default optimizer.
The only way to avoid this problem is to set a System property