CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    May 1999
    Posts
    9

    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?



  2. #2
    Join Date
    Mar 1999
    Posts
    9

    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.

  3. #3
    Join Date
    May 1999
    Posts
    9

    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.

  4. #4
    Join Date
    Apr 1999
    Posts
    15

    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

  5. #5
    Join Date
    Mar 1999
    Posts
    9

    Re: How can I add destructor to my component class?



    ATL Wizard puts an empty destructor in your class.

  6. #6
    Guest

    Re: How can I add destructor to my component class?

    My mistake, the class wizard doesn't add an empty destructor. Sorry..


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured