title: C# Memory leak in Bitmap
body: <p>I got a memory leak in my application in this lines.. If i take a look in the task manager, every time when this process is triggered, the RAM memory is increasing by +- 300 MB..</p>
  
  <pre><code>Bitmap bmp1 = new Bitmap(2480, 3508);
  panel1.DrawToBitmap(bmp1, new Rectangle(0, 0, 2480, 3508));
  pictureBox2.Image = bmp1;
  </code></pre>
  
  <p>Can someone help me with his leak? If I use:</p>
  
  <pre><code>bmp1.Dispose();
  </code></pre>
  
  <p>I get an exception in "Program.cs" at this line: <code>Application.Run(new Form1());</code>
  And after this, the application is stopped running... </p>
  
  <p>Screen application:
  <img src="https://i.stack.imgur.com/Gn4AI.png" alt="enter image description here"></p>