Closing context handles

Updated: October 26, 2022

The mm-renderer configuration determines whether client applications can obtain additional handles to existing contexts as well as how mm-renderer behaves when closing context handles.

Handles obtained by opening existing contexts are called secondary handles, whereas the handle obtained by creating a context is called the primary handle.

The configuration may allow contexts to exist after their primary handles have been closed. These are called orphan contexts. When such contexts are allowed, secondary handles are also allowed; however, secondary handles may be allowed when orphan contexts aren't. For clarification, see the descriptions of the -c and -o options in Command line for mm-renderer.

The behavior of mm-renderer in closing context handles is as follows:
Note: In all circumstances, it's important to properly close unneeded context handles to prevent memory leaks.