开发者

Android HttpClient memory leak?

I was looking at code for a sample Android application. Within the 开发者_如何学JAVAcode, the application creates an HttpClient, but I never see anywhere where the connection is closed. So I was wondering does this code create a memory leak? If not, can you explain why?

The link to the sample code is at:

http://developer.android.com/resources/samples/SampleSyncAdapter/src/com/example/android/samplesync/client/NetworkUtilities.html


HttpClient relies on a ClientConnectionManager to handle opening and closing connections. It (HttpClient) is a utility class that is supposed to allow you to forget about lots of details like closing connections.

"That's not a bug. It's a feature!"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜