This documentation is archived and is not being maintained.

4.4 __nogc Classes

Visual Studio .NET 2003

The keyword __nogc on a class or struct indicates that it is an unmanaged C++ class or struct.

Characteristics

  • The __nogc keyword on a class, struct, or new can be omitted. If it is unspecified, the default is __nogc.
  • __nogc new can be used to allocate memory for a __nogc class. The __nogc keyword can be omitted in this context, and the result is equivalent.

Constraint

  • __gc new shall not be used to allocate memory for a __nogc class.
Show: