Even if in my tests, calling Simulator::Destroy as indicated by the
ns-3 doc does not actually fix our leakage.
s4u::NetZone::on_seal_cb(&zoneCreation_cb);
}
+NetworkNS3Model::~NetworkNS3Model()
+{
+ ns3::Simulator::Destroy();
+}
+
StandardLinkImpl* NetworkNS3Model::create_link(const std::string& name, const std::vector<double>& bandwidths)
{
xbt_assert(bandwidths.size() == 1, "ns-3 links must use only 1 bandwidth.");
class NetworkNS3Model : public NetworkModel {
public:
explicit NetworkNS3Model(const std::string& name);
+ ~NetworkNS3Model();
StandardLinkImpl* create_link(const std::string& name, const std::vector<double>& bandwidth) override;
StandardLinkImpl* create_wifi_link(const std::string& name, const std::vector<double>& bandwidth) override;
Action* communicate(s4u::Host* src, s4u::Host* dst, double size, double rate) override;