commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "marius.cimpean" <>
Subject Re: [jira] Created: (VFS-143) Fix memory leak in DelegateFileObject in it's handling of listeners
Date Tue, 28 Oct 2008 14:58:10 GMT


It looks like the patch doesn't solve the memory-leak problem for all.

I am using commons-vfs to copy huge amount of files into a specific location
- I use VirtualFileSystem.

I am running a memory analyzer and I am able to see that inside of
org.apache.commons.vfs.provider.AbstractFileSystem class, there is a the
listenerMap that holds instances of WeakRefFileListener. It looks like the
WeakRefFileListener instances are never garbage collected and the
listenerMap gets never released - so the memory still remains occupied.

Basically, when dealing with huge amount of data there are two large maps
that holds instances related to commons-vfs internal stuff. The two maps are
- org.apache.commons.vfs.provider.AbstractFileSystem.listenerMap - never
gets released ==> OutOfMemory
- org.apache.commons.vfs.cache.SoftRefFilesCache.refReverseMap - it gets

Please let me know the right way that commons-vfs shall release its internal
resources (specially the listeners map I pointed above) in order to avoid
memory leaks and OutOfMemory situations.

Best Regards,
View this message in context:
Sent from the Commons - Dev mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message