Comm::destroy(smpi_process()->comm_world());
return;
}
- delete comm->topo_; // there's no use count on topos
Comm::unref(comm);
}
(*newcomm)->info_=MPI_INFO_NULL;
}
if(info != MPI_INFO_NULL){
+ info->ref();
(*newcomm)->info_=info;
}
return ret;
if(comm->refcount_==0){
comm->cleanup_smp();
comm->cleanup_attr<Comm>();
+ if (comm->info_ != MPI_INFO_NULL)
+ simgrid::smpi::Info::unref(comm->info_);
+ delete comm->topo_; // there's no use count on topos
delete comm;
}
}
}
}
-MPI_Info Comm::info(){
- if(info_== MPI_INFO_NULL)
+MPI_Info Comm::info()
+{
+ if (info_ == MPI_INFO_NULL)
info_ = new Info();
info_->ref();
return info_;
}
-void Comm::set_info(MPI_Info info){
- if(info_!= MPI_INFO_NULL)
+void Comm::set_info(MPI_Info info)
+{
+ if (info_ != MPI_INFO_NULL)
+ simgrid::smpi::Info::unref(info);
+ info_ = info;
+ if (info_ != MPI_INFO_NULL)
info->ref();
- info_=info;
}
MPI_Errhandler Comm::errhandler(){