title: Getting a "this field leaks a context object" when passing a context from Main Activity to Java Class via Constructor
body: <p>I have the following 2 lines of code in my MainActivity class passing a value:</p>
  
  <pre><code>RecyclerView mRecyclerView = findViewById(R.id.act_recyclerview);
  new LoadText(this,mRecyclerView).execute();
  </code></pre>
  
  <p>In my LoadText class, I am consuming as follows:</p>
  
  <pre><code>private Context mContext;
  private RecyclerView mRecyclerView;
  
  
  public LoadText(Context context, RecyclerView recyclerView){
      this.mContext=context;
      this.mRecyclerView=recyclerView;
  }
  </code></pre>
  
  <p>My code works fine, however Android Studio is warning of a resource leak when I hover over mContext and mRecyclerView. I have looked for solutions to similar problems like mine and it was suggested to pass the value via a constructor, which is what I am doing so I am not sure I understand why.</p>