I have the following sub that handles printing of a document:
VB Code:
  1. Private Sub PrintDocument1_PrintPage(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
  2.        
  3.         Dim boldfont As New Font("Arial", 16, FontStyle.Bold)
  4.         Dim smallfont As New Font("Arial", 10, FontStyle.Regular)
  5.         Dim regularfont As New Font("Arial", 16, FontStyle.Regular)
  6.         Dim ulboldfont As New Font("Arial", 16, FontStyle.Bold Or FontStyle.Underline)
  7.         Dim footerfont As New Font("Arial", 8, FontStyle.Regular)
  8.              
  9.         With e.Graphics
  10.  
  11.         ' Printing code
  12.                    
  13.         End With
  14.  
  15.         e.HasMorePages = False
  16.  
  17.         boldfont.Dispose()
  18.         smallfont.Dispose()
  19.         regularfont.Dispose()
  20.         ulboldfont.Dispose()
  21.         footerfont.Dispose()
  22.  
  23.         e.Graphics.Dispose()
  24.  
  25.     End Sub

Is it good practice to dispose of the fonts and the graphics object at the end, or is this not necessary?

Thanks.