Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 932 Bytes

File metadata and controls

31 lines (24 loc) · 932 Bytes
title Compiler Error C3084
description Learn more about: Compiler Error C3084
ms.date 11/04/2016
f1_keywords
C3084
helpviewer_keywords
C3084

Compiler Error C3084

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

Remarks

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 How to: Define and consume classes and structs (C++/CLI).

Example

The following example generates C3084.

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