I have figured out that this issue is with spring Core where it caches the class instance and does not clear it on undeployment.
I have a simple bundle with this xml
Code:
<bean id="bean1" class="com.test.Bean1">
<property name="bean2" ref="bean2"></property>
</bean>
<bean id="bean2" class="com.test.Bean2"></bean>
When i deploy undeploy this bundle 100 times i see in teh trace that class refernce is help by CachedIntrospectionResults.
All 150 instances of classloader is not garbage collected because of this.
Attached is the snapshot from MAT