[infinispan-issues] [JBoss JIRA] Commented: (ISPN-1190) ModuleProperties could cause memory leaks
Manik Surtani (JIRA)
jira-events at lists.jboss.org
Mon Jul 11 05:19:23 EDT 2011
[ https://issues.jboss.org/browse/ISPN-1190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12613397#comment-12613397 ]
Manik Surtani commented on ISPN-1190:
-------------------------------------
Hmm, this needs more thought. Generally, end users making use of module properties should be unsupported and if this results in a classloader leak, well, you were told not to use it. :)
A weak map won't help since the keys are typically Strings or bytes, which will be around for the lifetime of the JVM.
> ModuleProperties could cause memory leaks
> -----------------------------------------
>
> Key: ISPN-1190
> URL: https://issues.jboss.org/browse/ISPN-1190
> Project: Infinispan
> Issue Type: Bug
> Reporter: Galder Zamarreño
> Assignee: Manik Surtani
> Fix For: 5.1.0.BETA1, 5.1.0.Final
>
>
> ModuleProperties can create class memory leaks, because it contains static collections with references to user defined classes:
> {code}private static Map<Byte,Class<? extends ModuleCommandInitializer>> commandInitializers;
> private static Collection<Class<? extends ReplicableCommand>> moduleCommands;{code}
> Also, the following two collections could contain references to instances of user defined classes in static collections:
> {code}private static Map<String,ModuleProperties> moduleProperties;
> private static Map<Byte,ModuleCommandFactory> commandFactories;{code}
> These collections should not be static, and their clearing should be guaranteed at stoppage time. Even if there's any issues at stoppage time, they should not leak and so any collections containing Class instances should be weakly referenced.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the infinispan-issues
mailing list