Android Question Cleaning object from memory

pfillion

Member
Licensed User
Longtime User
Hi,

I'm using "Dim manager as billingmanager3" in my application. It works great. The only problem is that after I retrieve the licence status, the object stays in memory. When I go in Application Manager under my application, I see that my application take ±20kb and that the "Google Play Store (com.android.vending) - Service InAppBilling" in use is taking 13mb.

Is there a way to clear the manager reference I have in memory once I made my licence check ?
 

pfillion

Member
Licensed User
Longtime User
I've been running my application for hours and only check the licence once at the beginning but it's done in the same service that is start in foreground. So it seems that the process is not getting killed.
 
Upvote 0

pfillion

Member
Licensed User
Longtime User
How much time should it take for com.android.vending to get killed ?

I tried to put the BillingManager3 object in an activity as a Globals variable.

When I start the activity from my service it does the licence check. I use a callsub in the activity to my calling service to report the licence status. In the service, I do another callsub to a sub in the activity to tell it to "Activity.Finish".

I see in the log that the activity finished but 20+ minutes after it is killed the com.android.vending (Service InAppBillingService in use) process is still running. I thought that by putting the billing object in an activity and killing the activity that the process would get cleaned within few minutes. Unless I'm missing something ?

It's not me but some users are complaining that my app takes too much memory... I just wanted to make sure that this process would get killed few seconds/minutes after it has been used...

Thanks for the help...
 
Upvote 0
Top