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

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -