mmr_disconnect()

Updated: April 19, 2023

Disconnect from mm-renderer

Synopsis:

#include <mm/renderer.h>
void mmr_disconnect(mmr_connection_t *connection)

Arguments:

connection
An mm-renderer connection handle

Library:

mmrndclient

Description:

Disconnect from mm-renderer. Close any existing context handles associated with the connection being closed and free their memory. You shouldn't use these handles again, not even to close them. If any of them are primary handles, their contexts also get destroyed.

Note: This function blocks until all associated contexts have been destroyed. It's no longer asynchronous like in past releases.

The same thing happens in terms of contexts being destroyed if your application exits without explicitly disconnecting. This means you don't have to clean up old contexts when you restart the application.

Each context handle is associated with the connection handle used to create it. This means that if you have multiple connections to mm-renderer, calling mmr_disconnect() to close one of those connections doesn't necessarily close all of your context handles.