forms - Dispose all elements on application C# -


i'm working on c# project load images , stuff them.

there's button closes current project user working on.

is there way dispose elements @ once without doing application.restart();?

should go element element , disposing/setting null etc?

thanks!

there 2 types of resources need think of

1.) "managed" stuff basic variables, ui elements etc. these disposed expected when close form , don't have pay attention them.

2.) resources need disposed, database access objects, stream readers, timers, etc etc. if operations this, make sure dispose them before closing form, or else may , of time continue working in background , app won't close properly. learn how dispose objects in c#, instance

http://www.codeproject.com/articles/15360/implementing-idisposable-and-the-dispose-pattern-p http://lostechies.com/chrispatterson/2012/11/29/idisposable-done-right/


Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -