Huge memory usage in notifications

前端 未结 4 776
迷失自我
迷失自我 2020-12-28 09:44

I am developing an application with a service which show the progress of a timer in the notification area (with a progress bar and a text). I have extracted below a simpler

4条回答
  •  无人及你
    2020-12-28 10:24

    Try using DDMS to dump out the allocations - that should show you what objects are being allocated and where.

    My guess is that the progress bar is allocating some bitmaps on every call to setProgressBar (5 times per second) and that's what's churning through memory. What's not clear is why you are then running out - the GC seems to be picking it up, so something must be leaking.

提交回复
热议问题