Click to See Complete Forum and Search --> : How can I add destructor to my component class?
Alexander Serov
March 31st, 1999, 06:11 AM
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?
Dimarzio
March 31st, 1999, 11:40 AM
The descructor is in the header file. I'm not sure why the wizard puts the constructor/destructor in the header.
Alexander Serov
March 31st, 1999, 02:20 PM
I can add the destructor easily by hands . But the strange thing is that
the wizard doesn't allow me to create it.
Julius Ivanyi
March 31st, 1999, 03:36 PM
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
Dimarzio
March 31st, 1999, 06:14 PM
ATL Wizard puts an empty destructor in your class.
April 1st, 1999, 08:11 PM
My mistake, the class wizard doesn't add an empty destructor. :) Sorry..
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.