Re: [android-developers] Google provides 2 different examples of HttpURLConnection usage - Should we call HttpURLConnection's disconnect?

2014-04-20 Thread Enrique López Mañas
Yes, you should. According to the JavaDoc: http://docs.oracle.com/javase/7/docs/api/java/net/HttpURLConnection.html Each HttpURLConnection instance is used to make a single request but the underlying network connection to the HTTP server may be transparently shared by other instances. Calling the

[android-developers] Google provides 2 different examples of HttpURLConnection usage - Should we call HttpURLConnection's disconnect?

2014-04-17 Thread yccheok
Google is providing 2 different examples of HttpURLConnection usage. Not calling HttpURLConnection's disconnect http://developer.android.com/training/basics/network-ops/connecting.html // Given a URL, establishes an HttpUrlConnection and retrieves// the web page content as a InputStream,