RAD Studio
ContentsIndex
PreviousUpNext
E2241: VCL style classes need virtual destructors (C++)

Destructors defined in VCL style classes have to be virtual. 

 

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!