abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James M Snell (JIRA)" <j...@apache.org>
Subject [jira] Commented: (ABDERA-46) Memory Leak and Concurency Bug in Factory
Date Wed, 25 Apr 2007 00:17:15 GMT

    [ https://issues.apache.org/jira/browse/ABDERA-46?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12491492

James M Snell commented on ABDERA-46:

The WeakHashMap is supposed to be helping to prevent memory leaks.  It's possible that other
parts of the application are still holding references to the objects which may be preventing
the map from being cleaned appropriately. 

I've checked in a fix that synchronizes put's to the WeakHashMap.  Reads are not synchronized.
 Please give it a test and let me know if it works for you.  If not, I'll synchronized reads

> Memory Leak and Concurency Bug in Factory
> -----------------------------------------
>                 Key: ABDERA-46
>                 URL: https://issues.apache.org/jira/browse/ABDERA-46
>             Project: Abdera
>          Issue Type: Bug
>            Reporter: Brian McCallister
>         Assigned To: James M Snell
> Okay, am trying to reconstruct this from memory as I thought we had a filed a bug on
it months agao when we found it...
> If you use the same Factory from multiple threads it maintains a map of extension namespaces.
When you create a new element it accesses this map and if an addition is going the reader
can get caught traversing it forever. (HashMap is not thread safe).
> This map also keeps all extensions it ever sees, which can lead to a memory leak if you
use the default factory a lot -- say, with hundreds of thousands of extensions in my case.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message