Skip to content

Commit dcbc94d

Browse files
committed
Use using.
1 parent 5d703b9 commit dcbc94d

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

‎ReClass.NET/Forms/ClassSelectionForm.Designer.cs‎

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎ReClass.NET/UI/PlaceholderTextBox.cs‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ protected override void OnPaint(PaintEventArgs e)
6363

6464
if (string.IsNullOrEmpty(Text) && Focused == false)
6565
{
66-
e.Graphics.DrawString(PlaceholderText ?? string.Empty, Font, new SolidBrush(PlaceholderColor), new PointF(-1.0f, 1.0f));
66+
using (var brush = new SolidBrush(PlaceholderColor))
67+
{
68+
e.Graphics.DrawString(PlaceholderText ?? string.Empty, Font, brush, new PointF(-1.0f, 1.0f));
69+
}
6770
}
6871
}
6972
}

0 commit comments

Comments
 (0)