Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.1
-
Fix Version/s: 1.1
-
Component/s: Core Runtime
-
Labels:None
Description
After having done some work with OSGi it seems Qi4j-generated classes through CGLIB cannot be properly GC'ed. It seems both Spring and Hibernate have had similar issues. This causes memory leaks and eventual OutOfMemory-exceptions.
The solution is to replace CGLIB with manually created classes using the raw ASM library. Then it will be vastly easier to manage classloader, to ensure that Qi4j does not leak.

A new FragmentClassLoader that generates fragment subclasses and implement abstract methods that delegate to the proxy has been implemented using ASM.