c# - Why should graphics needs to be disposed? -


why should graphics needs disposed? pen , solidbrush?

well simple answer implement 'idisposable' need disposed.

the longer answer consume unmanaged resources need released. calling dispose directly (or using 'using' statement) can release resources rather waiting gc you.


Comments

Popular posts from this blog

c++ - How to modify context menu of internet explorer using IDocHostUIHandler::ShowContextMenu? -

android - Spacing between the stars of a rating bar? -

c# - Getting "Internal .Net Framework Data Provider error 30" error when column has NULL value -