lib: remove unused internal component destroy functions
[babeltrace.git] / src / lib / graph / component.c
index e5584b0fe9017bf671bd276dbc7bbcefcff75882..7b592b5031808935d0e05d4f0342f35989b6a65d 100644 (file)
@@ -40,13 +40,6 @@ struct bt_component * (* const component_create_funcs[])(void) = {
        [BT_COMPONENT_CLASS_TYPE_FILTER] = bt_component_filter_create,
 };
 
-static
-void (*component_destroy_funcs[])(struct bt_component *) = {
-       [BT_COMPONENT_CLASS_TYPE_SOURCE] = bt_component_source_destroy,
-       [BT_COMPONENT_CLASS_TYPE_SINK] = bt_component_sink_destroy,
-       [BT_COMPONENT_CLASS_TYPE_FILTER] = bt_component_filter_destroy,
-};
-
 static
 void finalize_component(struct bt_component *comp)
 {
@@ -147,11 +140,6 @@ void destroy_component(struct bt_object *obj)
                finalize_component(component);
        }
 
-       if (component->destroy) {
-               BT_LOGD_STR("Destroying type-specific data.");
-               component->destroy(component);
-       }
-
        if (component->input_ports) {
                BT_LOGD_STR("Destroying input ports.");
                g_ptr_array_free(component->input_ports, TRUE);
@@ -327,7 +315,6 @@ int bt_component_create(struct bt_component_class *component_class,
        bt_object_init_shared_with_parent(&component->base, destroy_component);
        component->class = component_class;
        bt_object_get_ref_no_null_check(component->class);
-       component->destroy = component_destroy_funcs[type];
        component->name = g_string_new(name);
        if (!component->name) {
                BT_LIB_LOGE_APPEND_CAUSE("Failed to allocate one GString.");
This page took 0.023963 seconds and 4 git commands to generate.