Export (0) Print
Expand All
Expand Minimize

Compiler Error C3084

Error Message

'function': a finalizer/destructor cannot be 'keyword'

A finalizer or destructor was declared incorrectly.

For example, a destructor should not be marked as sealed. The destructor will be inaccessible to derived types. For more information, see Explicit Overrides and Destructors and Finalizers in Visual C++.

Example

The following sample generates C3084.

// C3084.cpp
// compile with: /clr /c
ref struct R {
protected:
   !R() sealed;   // C3084
   !R() abstract;   // C3084
   !R();
};

Community Additions

ADD
Show:
© 2014 Microsoft