Android handling many HTTP requests
<p>Im building a application that needs to poll a webserver alot. Right now i create a recursive method that requests the server and when response is returned it starts all over again, i might put in a sleep in between later.</p>

<p>Now because i need this intensive request polling. I would like to optimize the actual code to do as little work for each request as possible.</p>

<p>I figured i could create a HttpGet (request) and DefaultHttpClient onces and just reuse these instances over and over again.
See <a href="http://pastebin.com/qa7k7uEY" rel="nofollow">http://pastebin.com/qa7k7uEY</a> </p>

<p>The problem is im receiving OutOfMemory errors after like 20 requests. </p>

<p>See error log here <a href="http://pastebin.com/58Dhh7L4" rel="nofollow">http://pastebin.com/58Dhh7L4</a></p>

<p>Is there a better way of handling this many requests??</p>
