-/* Copyright (c) 2007-2022. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-2023. 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. */
#include "src/kernel/activity/MailboxImpl.hpp"
-#include "simgrid/msg.h"
#include "src/kernel/activity/CommImpl.hpp"
#include <unordered_map>
MailboxImpl::~MailboxImpl()
{
- clear(false);
+ try {
+ clear(false);
+ } catch (const std::bad_alloc& ba) {
+ XBT_ERROR("MailboxImpl::clear() failure: %s", ba.what());
+ }
set_receiver(nullptr);
}