-/* Copyright (c) 2007-2018. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-2019. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
} else if (*op == MPI_OP_NULL) {
return MPI_ERR_OP;
} else {
- delete (*op);
+ simgrid::smpi::Op::unref(op);
*op = MPI_OP_NULL;
return MPI_SUCCESS;
}