Download Tutorial C Files H Files

dg_component_destroy

This function is used to destroy a component.

Usage

void dg_component_destroy(dg_component_t *component);

Example

dg_component_destroy(component);

Source code

void dg_component_destroy(dg_component_t *component)
{
    if (!component)
        return;
    component->on_destroy(component->data);
    free(component);
}