title: Should variables be reused to optimize resource utilization?
body: <p>I am Using Microsoft Visual C# 2010. I have several methods that use a large bitmap for local processing, and each method can be called several times.<br>I can declare a global variable and reuse it:</p>
  
  <pre><code>Bitmap workPic, editPic;
  ...
  void Method1() {
      workPic = new Bitmap(editPic);
      ...
  }
  void Method2() {
      workPic = new Bitmap(editPic.Width * 2, editPic.Height * 2);
      ...
  }
  </code></pre>
  
  <p>or declare a local variable in each method:</p>
  
  <pre><code>Bitmap editPic;
  ...
  void Method1() {
      Bitmap workPic = new Bitmap(editPic);
      ...
  }
  void Method2() {
      Bitmap workPic = new Bitmap(editPic.Width * 2, editPic.Height * 2);
      ...
  }
  </code></pre>
  
  <p>The second way is better for code clarity (local variables for local use). Is there a difference in terms of resource utilization?</p>