DestroyWindow

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form with a COM control and inside _Closing event of the form I call ComControl.Dispose() to avoid memory leaks because of the COM control. If I call DestroyWindow() and not use _Closing event, will it dispose the COM control?
 
Aris,

Since COM controls inside forms aren't supported except with a 3rd party
product, I don't know the answer to your question. But generally Dispose()
is the accepted way to go.
--
Ginny Caughey
..Net Compact Framework MVP

Aris said:
I have a form with a COM control and inside _Closing event of the form I
call ComControl.Dispose() to avoid memory leaks because of the COM control.
If I call DestroyWindow() and not use _Closing event, will it dispose the
COM control?
 
Back
Top