add free function to manage component

change cmp_type_base to abstraction type