H Herfried K. Wagner [MVP] Jun 15, 2010 #2 Am 14.06.2010 17:10, schrieb Mr. X.: How can I override the destructor (I.e of PictureBox). Click to expand... Did you already try to override the 'Finalize' method? Also note that Windows Forms controls implement the 'IDisposable' interface.
Am 14.06.2010 17:10, schrieb Mr. X.: How can I override the destructor (I.e of PictureBox). Click to expand... Did you already try to override the 'Finalize' method? Also note that Windows Forms controls implement the 'IDisposable' interface.
M Mr. X. Jun 15, 2010 #3 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
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