title: Leak found: AndroidHttpClient created and never closed
body: <p>I don't really instantiate an <a href="http://developer.android.com/reference/android/net/http/AndroidHttpClient.html" rel="noreferrer">AndroidHttpClient</a> anywhere in my code, but I do start a recognizer intent, which yields this exception at some point when my application runs:</p>
  
  <pre><code>Leak found
  java.lang.IllegalStateException: AndroidHttpClient created and never closed
      at android.net.http.AndroidHttpClient.&lt;init&gt;(AndroidHttpClient.java:152)
      at android.net.http.AndroidHttpClient.newInstance(AndroidHttpClient.java:138)
      at com.google.android.voicesearch.speechservice.SpeechServiceHttpClient.&lt;init&gt;(SpeechServiceHttpClient.java:59)
      at com.google.android.voicesearch.speechservice.ServerConnectorImpl.&lt;init&gt;(ServerConnectorImpl.java:85)
      at com.google.android.voicesearch.VoiceSearchContainerImpl.createRecognitionController(VoiceSearchContainerImpl.java:83)
      at com.google.android.voicesearch.GoogleRecognitionService.onCreate(GoogleRecognitionService.java:65)
      at android.app.ActivityThread.handleCreateService(ActivityThread.java:2066)
      at android.app.ActivityThread.access$2500(ActivityThread.java:123)
      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:993)
      at android.os.Handler.dispatchMessage(Handler.java:99)
      at android.os.Looper.loop(Looper.java:130)
      at android.app.ActivityThread.main(ActivityThread.java:3835)
      at java.lang.reflect.Method.invokeNative(Native Method)
      at java.lang.reflect.Method.invoke(Method.java:507)
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:847)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:605)
      at dalvik.system.NativeStart.main(Native Method)
  </code></pre>
  
  <p>Assuming the bug is not in Android's code but in mine, this leaked resource could have been created only in one of the following:</p>
  
  <ol>
  <li><code>SpeechRecognizer.createSpeechRecognizer()</code></li>
  <li><code>new RecognitionListener()</code></li>
  <li><code>new Intent(SpeechRecognizer.RESULTS_RECOGNITION)</code></li>
  <li><code>SpeechRecognizer.startListening(recognizerIntent)</code></li>
  </ol>
  
  <p>But how do I know which one?</p>