title: (AudioManager)getSystemService(Context.AUDIO_SERVICE) causing memory leak
body: <p>I had memory leak that was being caused by AudioManager. So I've commented out this line in my code to see if it would solve my problem:</p>
  
  <pre><code>public class FireRoomActivity extends Activity {
  
  AudioManager am;
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      am = (AudioManager)getSystemService(Context.AUDIO_SERVICE);
    }
  }
  </code></pre>
  
  <p>And it did solve the problem and I don't have memory leak any more. Is that because of Context.AUDIO_SERVICE? If yes then how could I replace it?</p>
  
  <p>If it matters, I have this non-static class inside my activity that is not used elsewhere outside</p>
  
  <pre><code>class GestureListener extends GestureDetector.SimpleOnGestureListener {
  RelativeLayout parentLayout;
  
  public void setLayout(RelativeLayout layout){
      parentLayout = layout;  }
  @Override
  public boolean onDown(MotionEvent e) {
      return true;
  }
  // event when double tap occurs
  @Override
  public boolean onDoubleTap(MotionEvent e) {     
      makeArrowsVisible();
      parentLayout.findViewById(R.id.cabinet_zoomed).setVisibility(View.INVISIBLE);
      Button key = (Button)parentLayout.findViewById(R.id.key);
      if(key!=null){
          key.setVisibility(View.INVISIBLE);}
      return true;
  }
  </code></pre>
  
  <p>Edit:
  screenshot of heap dump
  <img src="https://i.stack.imgur.com/7Fpza.png" alt="enter image description here"></p>