How can I add destructor to my component class?
Hello!
I tried to add a destructer to my component class but it says that the destructor already exists. I didn't add any destructor to the class
generated by ATL object wizard. I just need to close some handles before
my component is deleted. Could you help me?
Re: How can I add destructor to my component class?
The descructor is in the header file. I'm not sure why the wizard puts the constructor/destructor in the header.
Re: How can I add destructor to my component class?
I can add the destructor easily by hands . But the strange thing is that
the wizard doesn't allow me to create it.
Re: How can I add destructor to my component class?
Hi
don't try to add a destructor to the component, the ATL will take care of that.
If you have to clean up some stuff, you could add a method 'Delete()' or
something similar and call that before closing your component.
HTH
Julius
Re: How can I add destructor to my component class?
ATL Wizard puts an empty destructor in your class.
Re: How can I add destructor to my component class?
My mistake, the class wizard doesn't add an empty destructor. :) Sorry..