开发者

Service using too much memory in android resulting Force stopping

开发者 https://www.devze.com 2023-04-12 13:12 出处:网络
In my application,from a Service, i am entering data into database and collecting those datas in some Bean class object in a repeated time interval using a Timer. I am using that instance in my Activi

In my application,from a Service, i am entering data into database and collecting those datas in some Bean class object in a repeated time interval using a Timer. I am using that instance in my Activity to get the data. The system worked fine first. But the service keeps on consuming more memory. At some point it reached almost 30 MB. Eventually service is closed by the ActivityManager and statement issued is:Force stopping service ServiceRecord .Why service consumes so much memory,but the Application ran in just 100KB or so. I have used the MAT in eclipse, but it do开发者_StackOverflow社区es not give a clear picture which is consuming so much memory.


You must have memory leak somewhere. Check this, it gives good information on how to manage memory in Android.

0

精彩评论

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

关注公众号