Now uses vector of function pointers to destructors instead of recursive call and index test to destroy one_of components.