XPLM_MSG_PLANE_UNLOADED

#define XPLM_MSG_PLANE_UNLOADED 106

This message is sent to your plugin whenever a plane is unloaded. The parameter contains the index number of the plane being unloaded; 0 indicates the user’s plane. The parameter is of type int, bit-cast to a pointer.