Dictionary Object API

A dictionary object is a collection of key-value pairs that maps the names of parameters to their values. For mm-renderer, you can use the dictionary API to define context, input, and output parameters. Other components can use the same API to manage parameters specific to their purpose.

Both the keys and values are represented by shareable string objects. A shareable string is a data structure that encapsulates a string so that it can't be modified directly. This design allows multiple processes to read the string without the risk that the string will be changed inadvertently between reads. Modifying a shareable string actually destroys it and creates a new one.

The dictionary object API allows you to create multiple handles to a dictionary object and then use and even delete these handles in independent program components. After it's created, a dictionary is immutable until destroyed, so separate components can access it through their handles without worrying about synchronization.

Different dictionary object handles may be represented by identical pointers, so you shouldn't compare handles. Regardless of how the handles are represented internally, you must destroy each handle separately to properly dispose of any resources associated with it.