Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6108243
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:16:32+00:00 2026-05-23T14:16:32+00:00

this is just a general question about android with no particular use case in

  • 0

this is just a general question about android with no particular use case in mind. As I am currently still learning the platform, I have been doing some experimentation with services.

I have created a class called TestService that extends service. I have not made any changes to the code nor done anything inside the service. In essence, it is just an empty service. This is what I mean:

    public class TestService extends Service {
    @Override
        public IBinder onBind(Intent intent) {      
            return null;
        }
    }

Using the following code, I start the service in my activity:

    Intent sIntent = new Intent();
    sIntent.setClassName("com.mytestapp.android.servicetest", 
            "com.mytestapp.android.servicetest.TestService");
    startService(sIntent);

And to stop it, I call:

    stopService(sIntent);

Now to monitor if my service is actually started, I accessed the running services list provided by android by going to Settings -> Applications -> Running Services. And well, it works.. the service shows up there.

One thing I have noticed, however, is that EVERYTIME i stop and start my service again, the memory used by the service seems to be INCREASING (as shown by the running services information). After doing it for about twenty times, the memory used by the service increased by almost 50% of the original!

I find this to be strange, and I’m wondering if anyone can explain what seems to be happening here? Is this normal?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T14:16:33+00:00Added an answer on May 23, 2026 at 2:16 pm

    Is this normal?

    Most likely, those Service objects have not been garbage collected yet.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ok another WPF question, well I guess this is just general .NET. I have
i just want to know a general information about this particular information. Any good
This is not a theoretical or general question about when to use pass by
This is just a general question - I was sitting and waiting for a
For desktop application that is. This is just a general question that maybe only
Just a general curiosity question. Why is this namespace System.Collections.Generic added by default in
This is just a general question relating to some high-performance computing I've been wondering
I have a general question about DB synchronisation. So, I'm developing a website locally
I have a general question about the design of JavaScript Libraries. I am trying
I know it is more general question but i am curious about that.Android is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.