[ 
https://issues.apache.org/jira/browse/CXF-6632?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14949008#comment-14949008
 ] 

Daniel Kulp commented on CXF-6632:
----------------------------------

Is there an actual test case for this or is this "theory"?

In CXF's EndpointImpl, the passed in string for the wsdlLocation is explicitly 
reset to a non-static and unique String object specifically to avoid this:

{code}
wsdlLocation = wsdl == null ? null : new String(wsdl);
{code}

and the unique location is the one that is used for the lookup.   That string 
is only held onto by that specific EndpointImpl so when that EndpointImpl goes 
out of scope, the string should be released and the wsdl discarded.   

So the question specifically is: please describe the FULL scenario where this 
is a problem.  A test case is preferred. 


> Memory leak due to literal keys in WSDLDefinition map
> -----------------------------------------------------
>
>                 Key: CXF-6632
>                 URL: https://issues.apache.org/jira/browse/CXF-6632
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.7.17
>            Reporter: Giovanni Borelli
>            Assignee: Bharath Ganesh
>
> Looks like the definitionsMap in WSDLManagerImpl holds the WSDLDefinitions 
> against a weak key, again relying
> on the WeakHashMap semantics for removal.
> The loadDefinition(String) method loads the WSDLDef and puts this in a map
> against a String key even if it was passed as a URL through 
> getDefinition(URL). 
> Like the https://issues.apache.org/jira/browse/CXF-1639 this causes a memory 
> leak.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to