Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

allocation

Asking for a new piece of heap memory, which the garbage collector must later clean up.

A heap allocation reserves memory for a new object on the managed heap; allocation rate drives how often the garbage collector runs.

Examples

  • new List<int>(), boxing an int, and text += line inside a loop each allocate a new object on the heap.

Read the full section →