Skip to main content
This is lesson 12 of 15 in this module 12/15

Make Long-Lived Objects Large

The lesson shows how small objects that grow over time can end up being misclassified by the garbage collector, and explains how pre-sizing a list with an explicit capacity forces the runtime to allocate it directly on the large object heap, avoiding costly generation promotions.

Video lesson

Want to watch this lesson?

This lesson is part of the study plan. Get instant access to all lectures, labs and practice exams.

Get the Study Plan