A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Link Topo and Comm in both directions, and fix memory leak.
[simgrid.git]
/
src
/
smpi
/
mpi
/
smpi_comm.cpp
diff --git
a/src/smpi/mpi/smpi_comm.cpp
b/src/smpi/mpi/smpi_comm.cpp
index 6c2bacc133182d4c758e7da006f525e7d129dcc0..d8ca45b523a6d83cd845618ca0bc5050ab3d6a71 100644
(file)
--- a/
src/smpi/mpi/smpi_comm.cpp
+++ b/
src/smpi/mpi/smpi_comm.cpp
@@
-61,7
+61,6
@@
void Comm::destroy(Comm* comm)
Comm::destroy(smpi_process()->comm_world());
return;
}
Comm::destroy(smpi_process()->comm_world());
return;
}
- delete comm->topo_; // there's no use count on topos
Comm::unref(comm);
}
Comm::unref(comm);
}
@@
-334,6
+333,7
@@
void Comm::unref(Comm* comm){
if(comm->refcount_==0){
comm->cleanup_smp();
comm->cleanup_attr<Comm>();
if(comm->refcount_==0){
comm->cleanup_smp();
comm->cleanup_attr<Comm>();
+ delete comm->topo_; // there's no use count on topos
delete comm;
}
}
delete comm;
}
}