Export (0) Print
Expand All

4.5.4 Default Allocation Rules

Visual Studio .NET 2003

The default allocation rules follow from Section 4.4 for __nogc classes.

Characteristics

  • Any array of a managed element type is by default a __gc array.
  • Any array of an unmanaged element type is by default a __nogc array.

Example

// __gc_arrays6.cpp
// compile with: /clr
#using <mscorlib.dll>

int main() {
   int ia __gc[] = new int __gc[100];   // __gc array
};
Show:
© 2014 Microsoft