fsgonz commented on issue #409: CXF-7710: ClientImpl is memory-leak prone
URL: https://github.com/apache/cxf/pull/409#issuecomment-384780055
 
 
   I am taking the issue from @facundovs and I was reviewing the fix introduced 
in CXF-7591 as @dkulp mentioned. At first I thought that that may provide the 
users with a way to clear the context using: getResponseContext().clear() (as 
you said) , but I find that in every case where responseContext.put is used the 
clear method is not overridden so the when I invoke 
client.getResponseContext().clear(), the map associated to the thread key is 
removed but not the the entry with the thread. 
   In the case where a ThreadPool is used, a WeakHashMap will make no 
difference.
   Shouldn't the clear method of the hashmap always be overridden? For example 
here:
   
   
https://github.com/apache/cxf/blob/1396f046333108ec0e7819bf4de154505ff4564c/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java#L338
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to