- smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
- destroyContainer(getContainer (str));
+ container_t container = PJ_container_get(smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE));
+ PJ_container_remove_from_parent (container);
+ PJ_container_free (container);