つまりusingを使うわけだ
for (int i = 0; i < 10000; i++)
{
  using (var bmp = new Bitmap(1024, 1024))
  {
    // do something
  }
}