hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jammy Chen <jamm...@gmail.com>
Subject HttpPost object needs to be explicitly released?
Date Mon, 31 Aug 2015 14:54:03 GMT

Do I need explicitly release HttpPost object?

I am using HttpClient 4.3.6 in multiple-thread environment,  I read the
guide from
but it does not indicates we need call httpPost.releaseConnection() or

I know we should consume the HTTP response stream, close the stream, close
the response and also close the HTTP client instance, from the guide above,
it mentioned calling httpResponse.close() it will shutdown the http
connections already.

I am now having problem multiple-thread environment, after using
httpPost.releaseConnection() it works fine, but I am really concerned about
whether we need use it, from the the API doc of
httpPost.releaseConnection(), it says only for convenient http client 3

If it is needed, where should be? after closing HTTP response or before
closing HTTP response.

Thanks for your help


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message