commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles Gaillard (JIRA)" <j...@apache.org>
Subject [jira] Created: (VFS-221) Memory not released in SoftRefFilesCache
Date Mon, 06 Oct 2008 12:17:44 GMT
Memory not released in SoftRefFilesCache
----------------------------------------

                 Key: VFS-221
                 URL: https://issues.apache.org/jira/browse/VFS-221
             Project: Commons VFS
          Issue Type: Bug
         Environment: All
            Reporter: Gilles Gaillard
            Priority: Trivial


Implementation of method putFile(final FileObject file) does not remove references from refReverseMap
when adding a new file.

#current implementation
{noformat}
     synchronized (files)
    {
      files.put(file.getName(), ref);
      synchronized(refReverseMap)
      {
        refReverseMap.put(ref, key);
      }
    }
{noformat}

#should become:
{noformat}
    synchronized (files)
    {
      Reference old = files.put(file.getName(), ref);
      synchronized(refReverseMap)
      {
          refReverseMap.remove(old);
          refReverseMap.put(ref, key);
      }
    }
{noformat}


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


Mime
View raw message