CLR编程CLR的动态内存分配以不同的方式工作,CLR维护其独立于本地C++堆的内存堆。当我们不再需要在CLR堆上分配的内存时,CLR会自动将其删除。因此,我们不必在为CLR编写的程序中使用delete运算符。CLR还可以压缩内存堆,以避免不时产生的碎片。这样,CLR就消除了出现内存泄漏和内存碎片的可能性。CLR提供的堆管理和整理机制被称作垃圾回收(garbage collection)-- 垃圾即被抛弃的变量和对象,CLR管理的堆被称为可回收垃圾的堆(garbage-collected he
The .NET Framework consists of two parts: the common language runtime (CLR) and the Framework Class Library (FCL). The CLR provides the programming model that all application types will use. The CLR includes its own file loader, memory manager (the