+ if((*type)->in_use==0){
+ xbt_free(((s_smpi_mpi_struct_t *)(*type)->substruct)->block_lengths);
+ xbt_free(((s_smpi_mpi_struct_t *)(*type)->substruct)->block_indices);
+ xbt_free(((s_smpi_mpi_struct_t *)(*type)->substruct)->old_types);
+ }
+}
+
+void use_struct(MPI_Datatype* type){
+ int i=0;
+ for (i = 0; i < ((s_smpi_mpi_struct_t *)(*type)->substruct)->block_count; i++)
+ smpi_datatype_use(((s_smpi_mpi_struct_t *)(*type)->substruct)->old_types[i]);