Menu

#1 Fix for 1257327 - Memory Leak: Objects are not released ...

closed-fixed
nobody
None
5
2005-10-10
2005-09-14
No

I am attaching a patch (BulkBean.diff)
that fixes the problem reported in this bug report:
http://sourceforge.net/tracker/index.php?func=detail&aid=1257327&group_id=56933&atid=482368

It is similar to the fix done in the Enhancer 3 months ago.
http://cvs.sourceforge.net/viewcvs.py/cglib/cglib/src/proxy/net/sf/cglib/proxy/Enhancer.java?only_with_tag=RELEASE_2_1_1
Except it is for the BulkBeanKey processing.

The underlying issue is that you have

Source -> WeakHashMap<classloader, map>

with the map holding

BulkBeanKey -> SoftReference(generated class)

But the generated BulkBeanKey holds hard links
to the original classes (target and types).

Using the class names fixes the problem. Since the cache
is already keyed by the classloader the class namespace
must be unique because of JVM loader constraints.

See this related JBoss issue:
http://jira.jboss.com/jira/browse/JBAS-2256

Discussion

  • Adrian Brock

    Adrian Brock - 2005-09-14
     
  • Adrian Brock

    Adrian Brock - 2005-09-14
    • summary: Fix for 1257327 --> Fix for 1257327 - Memory Leak: Objects are not released ...
     
  • Juozas Baliuka

    Juozas Baliuka - 2005-10-10
    • status: open --> closed-fixed