Concrete examples of Allocations with Alternatives

I was just thinking… there are a lot of discussions on these forums related to garbage collection and avoiding allocations but for people, such as myself, without Unity pro it can sometimes be hard to learn with confidence. In my attempts to learn the dos and don’ts of allocation in Unity I’ve made a lot of progress, but without a profiler it often feels like I’m shooting at an invisible target. At the end of the day it’s hard to know with certainty if I’m hitting the mark.

Anyway here’s my point… it would be super awesome to have some sort of resource with concrete code examples of things that will cause allocation and an alternative to them. If something like this already exists please share it here :smile:

Those links provide a great starting point. I’m eager to try my hand at using ILSpy to identify allocations in my code. I still think there would be value to the community to have concrete code examples that clearly indicate common mistakes as well as their solutions so I will likely post back here with some examples once I am confident.