XPLMDestroyAvionics
XPLM_API void XPLMDestroyAvionics(
XPLMAvionicsID inHandle);
Destroys the cockpit device and deallocates its screen’s memory. You should only ever call this for devices that you created using XPLMCreateAvionicsEx(), not X-Plane' built-ine devices you have customised.