Game Development Reference
In-Depth Information
Figure 34.9 CLR Profiler allocation graph.
The CLR Profiler is accompanied by a high-performance overhead, making certain
analysis tests difficult to do, but it is very useful in other areas, such as memory effi-
ciency and usage.
Finalization and the Dispose Pattern
Even though automatic memory management handles releasing the memory of an
allocation when the resource is no longer needed, some resources have some spe-
cial steps that must be performed before releasing the memory.
The Common Language Runtime provides a mechanism that automatically handles
resource cleanup before memory is freed by the garbage collector. This mechanism
is called finalization , and it is used to release native resources such as operating
system handles or database connections.
Search Nedrilad ::

Custom Search