ResPluginDestroyF_t

A function you must write to release resources allocated to the plugin

Synopsis:

typedef void ResPluginDestroyF_t (ResPluginHandle_t handle )

Description:

This function is exported in the ResPluginCommon_t structure.

This function is called by PhAB to destroy an instance of the resource editor and free the resources allocated.

If the plugin is a frugal editor, then the plugin's widgets have already been destroyed at this point.

If the plugin is a full editor, then it is the plugin's responsibility to destroy its widgets and window, perhaps by calling PtDestroyWidget() with the topmost widget as an argument.

Arguments:

handle
The ResPluginHandle_t handle returned when the instance of the editor is created with a create function, either ResPluginFrugalCreateF_t or ResPluginFullCreateF_t.

Examples:

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

static void plugin_full_destroy( ResPluginHandle_t handle )
{
  PluginFullInstance_t *instance =
    ( PluginFullInstance_t * ) handle;
  instance->exp->destroy( instance->convenience_handle );
  free( instance );
}

Classification:

QNX Neutrino

See also:

ResPluginCommon_t, ResPluginFrugalCreateF_t, ResPluginFullCreateF_t, Resource datatypes.