2

I have simple network counter application, which has two parts A service and a view. I have a memory leak issue with my application. First I will explain my app briefly.

Service part

Service costs 2-3 Mb and in runs evertime. (starts with BOOT_COMPLETED and never die) It sends statictics to server periodically. And I dont have a memory problem with Service.

Activity part

I have a, 1 layout very simple view that shows statictics to user. If I dont add an Adview on it this view costs 3 Mb and no memory leak. If I add a AdView on it, it costs 9 Mb(11Mb with Service) on memory and CONTINUE TO GROW on every pause/resume of activity. At the and I guess system kills whole application including service And this is very bad news.

I want to completely remove this Activity when not in use. (leaving Service alive.)

How can I completely remove Activity from memory apart from service?

I guess I should have some workaround in my case.

Notes:

I dont need orientation change. it is set to portrait. btw, I really dont understand this is not fixed yet in Admob. Here is some other resources I have tried.

Android Admob 4.1.1 has a memory leak (see attached test project). Cause/fix/work around?

Android AdMob causes memory leak?

http://1gravity.com/index.php?option=com_content&view=article&id=71:android-and-memory-leaks&catid=37:android&Itemid=59

Community
  • 1
  • 1
user884624
  • 123
  • 3
  • 7
  • I'd like to see this investigated a little more. The Java gc should be able to remove all objects that are not "live", so in cases of a memory leak, there usually is some thread running which keeps a reference to old objects. Can we see if we find out about any threading in Admob using DDMS etc.? – JimmyB Nov 10 '11 at 18:17
  • I have this issue too. It is said that the AdView keeps a reference to the activity, but this does not explain why the RAM usage continues to grow... – Jong Nov 13 '11 at 14:26
  • I also have this issue on the SDK 4.3.2, and there is no way to contact them... on their site it says that the contacting page could not be found... funny... – TacB0sS Dec 02 '11 at 02:16

0 Answers0