Override destructor.

  • Thread starter Thread starter Mr. X.
  • Start date Start date
Am 14.06.2010 17:10, schrieb Mr. X.:
How can I override the destructor (I.e of PictureBox).

Did you already try to override the 'Finalize' method?

Also note that Windows Forms controls implement the 'IDisposable' interface.
 
Yes, I have tried override finalize method,
but when I did on program : myControl.Dispose(),
and put breakpoint on finalize method - I didn't reach that method.
Also I did after dispose : gc.collect(), and didn't reach the code neighter.

I will try IDisposable.

Thanks :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Destructors 1
overriding function 2
different between structure and array 3
About constructors & Destructors 5
Destructors 1
basic question...destructors confusion 2
IDisposable 2
how to make destructor 3

Back
Top