How to delete an object of a polymorphic class type that has no virtual destructor

后端 未结 6 1253
清酒与你
清酒与你 2021-02-07 09:37

I am getting the following error when I try to compile some code from a Third-party SDK.

*Description    Resource    Path    Location    Type
deleting object of          


        
6条回答
  •  轮回少年
    2021-02-07 10:12

    In this scenario you need to add virtual destructor to your class rather than removing compilation flag from here.

    eg. for class Myclass this error is coming then add

    virtual ~Myclass(){}
    

    Try this soultion, it will work fine.

提交回复
热议问题