नोट
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप साइन इन करने या निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
'classname': class has virtual functions, but its non-trivial destructor is not virtual; instances of this class may not be destructed correctly
Remarks
When a class has virtual functions but a nonvirtual destructor, objects of the type might not be destroyed properly when the class is destroyed through a base class pointer.
This warning is off by default. For more information, see Compiler Warnings That Are Off by Default.
Example
The following example generates C4265:
// C4265.cpp
// compile with: /W3 /c
#pragma warning(default : 4265)
class B
{
public:
virtual void vmf();
~B();
// try the following line instead
// virtual ~B();
}; // C4265
int main()
{
B b;
}