title: Why are variables in the Service not "reset" after stopping a Service (its onDestroy has been executed)?
body: <p>In one Activity, I define the following Button listener:</p>
  
  <pre><code>final Button button = (Button) findViewById(R.id.buttonExit);
  button.setOnClickListener(new View.OnClickListener() {
      public void onClick(View v) {
          stopService(new Intent(StartupActivity.this, SamcomService.class));
          finish();
      }
  });
  </code></pre>
  
  <p>As you can see, the button is supposed to stop the running Service (created in a previous step), and then finish itself.</p>
  
  <p>When I press the button, the Service.onDestroy is executed just as expected. In the onDestroy I do some cleaning, and then lastly call <em>super.onDestroy()</em>:</p>
  
  <pre><code> @Override
   public void onDestroy() {   // the service onDestroy
  
       // Do some cleaning
  
       NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
       mNotificationManager.cancel(1);
  
       // more cleaning
       Toast.makeText(this, "The service has been stopped! Wii!", Toast.LENGTH_LONG).show();
        super.onDestroy();
   }
  </code></pre>
  
  <p>Im my world, that means this Service is dead and buried, along with all the variables in it. Right? 
  Well, it doesnt seem like it.</p>
  
  <p>The think is, I have a String in my Service that I append text to before I click the button to stop the service. Something like this:</p>
  
  <pre><code>public class SamcomService extends Service {
  
      private String startupText = "";
  
      private void addTextToStartup(String text)
      {
          startupText += text;
  
          // Sending a broadcast, not relevant
          // ...
      }
  
      // ...
  }
  </code></pre>
  
  <p>That string, <em>startupText</em>, is not reset when I launch my app again! Its like the Service wasn't killed at all. The startupText contains all the text that was added to it in the previous run.</p>
  
  <p>Why is that? What am I missing? Isnt the Service dead? When I launch the app again, the Service onCreate method is called, implying that it is started from scratch...</p>
  
  <p>--- EDIT ---</p>
  
  <p>I just read this:
  <a href="https://stackoverflow.com/questions/4981851/what-exactly-does-ondestroy-destroy">What exactly does onDestroy() destroy?</a></p>
  
  <p>That means that the onDestroy doesnt really destroy anything. Correct? Its pretty lame, and extremely annoying. One well-visited thread here on SO that I create almsot 2 years ago discussing this issue I guess...:
  <a href="https://stackoverflow.com/questions/2033914/quitting-an-application-is-that-frowned-upon">Is quitting an application frowned upon?</a></p>