Memory Domains

Memory space within the Unity Engine can be essentially split into three different Memory Domains. Each Domain stores different types of data and takes care of a very different set of tasks.

The first Memory Domain--the Managed Domain--should be very familiar. This Domain is where the Mono platform does its work, where any MonoBehaviour scripts and custom C# classes we write will be instantiated at runtime, and so we will interact with this Domain very explicitly through any C# code we write. It is called the Managed Domain because this memory space is automatically managed by a Garbage Collector.

The second Domain--the Native Domain--is more subtle since we only interact with it indirectly. Unity has an underlying Native Code ...

Get Unity 2017 Game Optimization - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.