one, in-memory data type classification (1) value type:BOOL byte Char decimal Double enum float int Long sbyte Short struct UINT ULONG ushort(2) Reference typeclass Interface Delegate Object stringTwo, Memory classification1, Stack (stack)-Automatically allocated by the compiler to release, store parameter values for functions, values for local variables, and so on. It operates in a manner similar to a stack in a data structure. 2, Heap area (heap)-typically released by the programmer, if the programmer does not release, the program may end up being recycled by the OS. Note that it is not the same as the heap in the data structure, the distribution is similar to the list, hehe. 3, Global zone (static zone) (Static--The storage of global variables and static variables is placed in a block, initialized global variables and static variables in an area, uninitialized global variables and uninitialized static variables in another adjacent area. -System released after the program is finished4, literal constant area-the constant string is put here. Released by the system after the program is finished5, program code area-binary code that holds the body of the function.
C # Memory Management