comm to MPI_Comm_free, if MPI is not yet finalized.
This function "frees" the given communicator by giving it to MPI_Comm_free. It only does so if MPI_Finalize has not yet been called. If MPI_Finalize has been called, this function does nothing, since it is not legal to call most MPI functions after MPI_Finalize has been called. This function also ignores any errors returned by MPI_Finalize, which makes it suitable for use in a destructor.
- This function may allow a memory leak in your program, if you have allowed the MPI_Comm to persist after MPI_Finalize has been called.
Definition at line 62 of file Teuchos_DefaultMpiComm.cpp.