OutOfMemoryError at AbstractStringBuilder enlargeBuffer

前端 未结 1 624
旧巷少年郎
旧巷少年郎 2020-12-18 22:24

I am reading the youtube response in Stream and converting it to String. using the below code:

URL: http://gdata.youtube.com/feeds/api/users/cnn/uploads?&v=2&

相关标签:
1条回答
  • 2020-12-18 22:35

    Well, OutOfMemoryErrors are coming obviously when the virtual machine runs out of memory. The important point here is that the exact stack trace might not be informative, because it could happen that another thread uses all of the memory. Or something memory-consuming happened on this thread before this code, and this code was only the "last straw". This URL certainly does not contain too many bytes, I think the problem is in another place.

    You could try a memory analyzer: Android ==> Memory Analysing ==> Eclipse memory analyzer?

    0 讨论(0)
提交回复
热议问题