dkulp commented on issue #409: CXF-7710: ClientImpl is memory-leak prone URL: https://github.com/apache/cxf/pull/409#issuecomment-384696444 I think adding a method to Client like: ``` default AutoCloseable autoCloseContexts() { return new AutoCloseable() { @Override public void close() throws Exception { getRequestContext().clear(); getResponseContext().clear(); } }; } ``` might be a useful idea. In the code, you could use the try with resources to make sure the contexts are completely cleared: ``` try (((Client)proxy).autoCloseContexts()) { proxy.callWhateverMethods(....); } ``` Thoughts?
---------------------------------------------------------------- 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
