- performance (memory leaks, RAM Footprint)
- stability (temporary objects, memory leaks)
- scalability (RAM Footprint)
- other applications - sluggish performance (RAM Footprint, temporary objects)
.NET automatically manages the memory (creates objects onto managed memory heap, destroys object that are no more in use).
Object allocated when you use new.
Types of memory used by .NET:
- local variables, method parameters, return values, and other temporary values are stored
- is allocated on a per-thread basis
- GC is not responsible for cleaning up the stack / GC is aware of references to objects stored on the stack.
- is used for runtime data structures, method tables, Microsoft intermediate language (MSIL), JITed code, and so forth
- Managed code can allocate unmanaged heap memory directly by calling into unmanaged Win32® APIs or by instantiating COM objects.
- is where managed objects are allocated and it is the domain of the garbage collector.
- small object heap (SOH)
- large object heap (LOH)
Memory Management: Algorithms and Implementations in C/C++ (Windows Programming/Development)