XPLMUnloadObject
XPLM_API void XPLMUnloadObject(
XPLMObjectRef inObject);
This routine marks an object as no longer being used by your plugin. Objects are reference counted: once no plugins are using an object, it is purged from memory. Make sure to call XPLMUnloadObject once for each successful call to XPLMLoadObject.