[
https://issues.apache.org/jira/browse/VFS-221?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ralph Goers resolved VFS-221.
-----------------------------
Resolution: Fixed
Fix Version/s: 2.0
Assignee: Ralph Goers
I added similar code. Please check trunk and close this if it resolves your
problem.
> 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
> Assignee: Ralph Goers
> Priority: Trivial
> Fix For: 2.0
>
> Original Estimate: 0.25h
> Remaining Estimate: 0.25h
>
> 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.