gibic

Example

class a()
{
public a()
{
}

~a()
{
do_something()
}
}

i think that after close program every instances of class "a" will destroyed automaticaly with garbage collector, and my destructor with method do_something() will processed. But it doesn`t.
How can i make this

thank you
palo (sorry my english)



Re: Visual C# General automatic destructor

Galin Iliev

take a look at here http://msdn2.microsoft.com/en-us/library/system.idisposable.aspx

pay close attention to the examples.

Hope this helps