public void Dispose()
{
// Is there a graphics instance that might need disposed?
if (_graphics != null)
{
// Only dispose if we created it
if (_disposeGraphics)
_graphics.Dispose();
_graphics = null;
}
// Is there a manager instance that might need disposed?
if (_manager != null)
{
// Only dispose if we created it
if (_disposeManager)
_manager.Dispose();
_manager = null;
}
}