BufferedGraphicsContext graphicsContext = BufferedGraphicsManager.Current; BufferedGraphics bufferedGraphics = graphicsContext.Allocate(this.CreateGraphics(), this.DisplayRectangle); // Use the bufferedGraphics instance here... bufferedGraphics.Dispose(); graphicsContext.Dispose();This code example shows how to use the Dispose method to release resources used by the buffered graphics context. The graphicsContext is created using the BufferedGraphicsManager. The Allocate method is used to allocate a new graphics buffer for the control. After using the bufferedGraphics instance, it is disposed using the Dispose method. Finally, the graphicsContext is also disposed to release all resources used by it. Package Library: System.Drawing.dll