search

Home  >  Q&A  >  body text

请问C++cli中的析构函数和终结函数的区别是什么?

public ref class MyClass
{
public:
MyClass();
virtual ~MyClass();

protected:
    !MyClass();

private:
    CMyClass* _CMyClass;
};

还有就是这里面的析构函数和C++中的析构函数意义是否相同呢?
是否也需要加上virtual?

阿神阿神2803 days ago567

reply all(1)I'll reply

  • 高洛峰

    高洛峰2017-04-17 11:58:54

    I have never learned C++. In other languages, it is the last method called after a class is instantiated

    reply
    0
  • Cancelreply