ResPluginUnloadingF_t

A function you must write to release resources shared between plugins in a DLL

Synopsis:

typedef void ResPluginUnloadingF_t( void )

Description:

This function is exported in the ResPlugin_t structure.

This function is called before the DLL is unloaded from PhAB's address space, and should release resources set up in the ResPluginLoadingF_tloading function.. Since the loading function may have been called more than once, there is a corresponding call to the unloading function for each successful call to the loading function.

Examples:

This example unloading function is from the complete plugin example at the end of this chapter.

static int loaded_count = 0;
static ApDBase_t *db = NULL;

static void plugin_unloading( void ) {
  if( -- loaded_count == 0 ) {
    ApCloseDBase( db );
    db = NULL;
    ApRemoveContext( &AbContext );
    }
  }

Classification:

QNX Neutrino

See also:

ResPlugin_t, ResPluginLoadingF_t.