RAD Studio |  |

E2241: VCL style classes need virtual destructors (C++)
Example
Collapse All

Destructors defined in VCL style classes have to be virtual.

Example
Copy Code

    struct__declspec(delphiclass) vclclass1
    {
    ~vclclass1() {}           // Error
    };
    struct__declspec(delphiclass) vclclass2
    {
    virtual ~vclclass2() {}   // OK
    };

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!