View | Details | Raw Unified | Return to bug 711
Collapse All | Expand All

(-)a/src/devices/mesh/dot11s/hwmp-protocol.cc (+8 lines)
 Lines 193-213    Link Here 
193
193
194
HwmpProtocol::~HwmpProtocol ()
194
HwmpProtocol::~HwmpProtocol ()
195
{
195
{
196
  m_mp = 0;
196
}
197
}
197
198
198
void
199
void
199
HwmpProtocol::DoDispose ()
200
HwmpProtocol::DoDispose ()
200
{
201
{
202
  NS_LOG_FUNCTION_NOARGS ();
201
  for (std::map<Mac48Address, EventId>::iterator i = m_preqTimeouts.begin (); i != m_preqTimeouts.end (); i ++)
203
  for (std::map<Mac48Address, EventId>::iterator i = m_preqTimeouts.begin (); i != m_preqTimeouts.end (); i ++)
202
    {
204
    {
203
      i->second.Cancel ();
205
      i->second.Cancel ();
204
    }
206
    }
207
  for (HwmpProtocolMacMap::iterator i = m_interfaces.begin (); i != m_interfaces.end (); i ++)
208
    {
209
      i->second = 0;
210
    }
205
  m_proactivePreqTimer.Cancel();
211
  m_proactivePreqTimer.Cancel();
206
  m_preqTimeouts.clear ();
212
  m_preqTimeouts.clear ();
207
  m_lastDataSeqno.clear ();
213
  m_lastDataSeqno.clear ();
208
  m_lastHwmpSeqno.clear ();
214
  m_lastHwmpSeqno.clear ();
215
  m_interfaces.clear ();
209
  m_rqueue.clear ();
216
  m_rqueue.clear ();
210
  m_rtable = 0;
217
  m_rtable = 0;
218
  m_mp = 0;
211
}
219
}
212
220
213
bool
221
bool
(-)a/src/devices/mesh/dot11s/ie-dot11s-beacon-timing.cc (-8 lines)
 Lines 118-136    Link Here 
118
void
118
void
119
IeBeaconTiming::ClearTimingElement ()
119
IeBeaconTiming::ClearTimingElement ()
120
{
120
{
121
  uint16_t to_delete = 0;
122
  uint16_t i;
123
  for (NeighboursTimingUnitsList::iterator j = m_neighbours.begin (); j != m_neighbours.end (); j++)
121
  for (NeighboursTimingUnitsList::iterator j = m_neighbours.begin (); j != m_neighbours.end (); j++)
124
    {
122
    {
125
      to_delete++;
126
      (*j) = 0;
123
      (*j) = 0;
127
    }
124
    }
128
  for (i = 0; i < to_delete; i++)
129
    {
130
      m_neighbours.pop_back ();
131
    }
132
  m_neighbours.clear ();
125
  m_neighbours.clear ();
133
134
}
126
}
135
uint8_t
127
uint8_t
136
IeBeaconTiming::GetInformationSize () const
128
IeBeaconTiming::GetInformationSize () const
(-)a/src/devices/mesh/dot11s/ie-dot11s-preq.cc (-5 lines)
 Lines 373-388    Link Here 
373
void
373
void
374
IePreq::ClearDestinationAddressElements ()
374
IePreq::ClearDestinationAddressElements ()
375
{
375
{
376
  int i;
377
  for (std::vector<Ptr<DestinationAddressUnit> >::iterator j = m_destinations.begin (); j
376
  for (std::vector<Ptr<DestinationAddressUnit> >::iterator j = m_destinations.begin (); j
378
      != m_destinations.end (); j++)
377
      != m_destinations.end (); j++)
379
    {
378
    {
380
      (*j) = 0;
379
      (*j) = 0;
381
    }
380
    }
382
  for (i = 0; i < m_destCount; i++)
383
    {
384
      m_destinations.pop_back ();
385
    }
386
  m_destinations.clear ();
381
  m_destinations.clear ();
387
  m_destCount = 0;
382
  m_destCount = 0;
388
}
383
}
(-)a/src/devices/mesh/dot11s/peer-management-protocol.cc (+6 lines)
 Lines 93-98    Link Here 
93
      i->second.clear ();
93
      i->second.clear ();
94
    }
94
    }
95
  m_neighbourBeacons.clear ();
95
  m_neighbourBeacons.clear ();
96
97
  for (PeerManagementProtocolMacMap::iterator i = m_plugins.begin (); i != m_plugins.end (); i++)
98
    {
99
      i->second = 0;
100
    }
101
  m_plugins.clear ();
96
}
102
}
97
103
98
bool
104
bool
(-)a/src/devices/mesh/mesh-point-device.cc (+3 lines)
 Lines 73-78    Link Here 
73
      *iter = 0;
73
      *iter = 0;
74
    }
74
    }
75
  m_ifaces.clear ();
75
  m_ifaces.clear ();
76
  m_node = 0;
77
  m_channel = 0;
78
  m_routingProtocol = 0;
76
  NetDevice::DoDispose ();
79
  NetDevice::DoDispose ();
77
80
78
}
81
}
(-)a/src/devices/mesh/mesh-wifi-beacon.h (-2 lines)
 Lines 27-34    Link Here 
27
#include "ns3/wifi-mac-header.h"
27
#include "ns3/wifi-mac-header.h"
28
#include "ns3/wifi-information-element-vector.h"
28
#include "ns3/wifi-information-element-vector.h"
29
29
30
#include <vector>
31
32
namespace ns3 {
30
namespace ns3 {
33
31
34
/**
32
/**
(-)a/src/devices/mesh/mesh-wifi-interface-mac.cc (+10 lines)
 Lines 278-289    Link Here 
278
  NS_LOG_FUNCTION (this);
278
  NS_LOG_FUNCTION (this);
279
  delete m_rxMiddle;
279
  delete m_rxMiddle;
280
  delete m_dcfManager;
280
  delete m_dcfManager;
281
  for (PluginList::iterator i = m_plugins.begin (); i != m_plugins.end (); i++)
282
    {
283
      *i = 0;
284
    }
285
  for (Queues::iterator i = m_queues.begin (); i != m_queues.end (); i++)
286
    {
287
      i->second = 0;
288
    }
281
  //Delete smart pointers:
289
  //Delete smart pointers:
282
  m_rxMiddle = 0;
290
  m_rxMiddle = 0;
283
  m_low = 0;
291
  m_low = 0;
284
  m_dcfManager = 0;
292
  m_dcfManager = 0;
293
  m_stationManager = 0;
285
  m_phy = 0;
294
  m_phy = 0;
286
  m_queues.clear ();
295
  m_queues.clear ();
296
  m_plugins.clear ();
287
  m_beaconSendEvent.Cancel ();
297
  m_beaconSendEvent.Cancel ();
288
  m_beaconDca = 0;
298
  m_beaconDca = 0;
289
299
(-)a/src/devices/mesh/wifi-information-element-vector.cc (-1 / +1 lines)
 Lines 74-80    Link Here 
74
void
74
void
75
WifiInformationElementVector::Serialize (Buffer::Iterator start) const
75
WifiInformationElementVector::Serialize (Buffer::Iterator start) const
76
{
76
{
77
  for(std::vector<Ptr<WifiInformationElement> >::const_iterator i = m_elements.begin (); i != m_elements.end (); i ++)
77
  for(IE_VECTOR::const_iterator i = m_elements.begin (); i != m_elements.end (); i ++)
78
    {
78
    {
79
      start.WriteU8((*i)->ElementId ());
79
      start.WriteU8((*i)->ElementId ());
80
      start.WriteU8 ((*i)->GetInformationSize ());
80
      start.WriteU8 ((*i)->GetInformationSize ());
(-)a/src/devices/wifi/interference-helper.cc (-1 / +1 lines)
 Lines 611-617    Link Here 
611
    {
611
    {
612
      *i = 0;
612
      *i = 0;
613
    }
613
    }
614
  m_events.erase (m_events.begin (), m_events.end ());
614
  m_events.clear ();
615
}
615
}
616
616
617
void
617
void
(-)a/src/devices/wifi/wifi-net-device.cc (-2 / +10 lines)
 Lines 28-33    Link Here 
28
#include "ns3/pointer.h"
28
#include "ns3/pointer.h"
29
#include "ns3/node.h"
29
#include "ns3/node.h"
30
#include "ns3/trace-source-accessor.h"
30
#include "ns3/trace-source-accessor.h"
31
#include "ns3/log.h"
32
33
NS_LOG_COMPONENT_DEFINE ("WifiNetDevice");
31
34
32
namespace ns3 {
35
namespace ns3 {
33
36
 Lines 65-77    Link Here 
65
WifiNetDevice::WifiNetDevice ()
68
WifiNetDevice::WifiNetDevice ()
66
  : m_mtu (0),
69
  : m_mtu (0),
67
    m_configComplete (false)
70
    m_configComplete (false)
68
{}
71
{
72
  NS_LOG_FUNCTION_NOARGS ();
73
}
69
WifiNetDevice::~WifiNetDevice ()
74
WifiNetDevice::~WifiNetDevice ()
70
{}
75
{
76
NS_LOG_FUNCTION_NOARGS ();
77
}
71
78
72
void
79
void
73
WifiNetDevice::DoDispose (void)
80
WifiNetDevice::DoDispose (void)
74
{
81
{
82
  NS_LOG_FUNCTION_NOARGS ();
75
  m_node = 0;
83
  m_node = 0;
76
  m_mac->Dispose ();
84
  m_mac->Dispose ();
77
  m_phy->Dispose ();
85
  m_phy->Dispose ();
(-)a/src/devices/wifi/yans-wifi-channel.cc (+7 lines)
 Lines 56-61    Link Here 
56
{}
56
{}
57
YansWifiChannel::~YansWifiChannel ()
57
YansWifiChannel::~YansWifiChannel ()
58
{
58
{
59
  m_loss = 0;
60
  m_delay = 0;
61
62
  for (PhyList::iterator i = m_phyList.begin (); i != m_phyList.end (); i++)
63
    {
64
      *i = 0;
65
    }
59
  m_phyList.clear ();
66
  m_phyList.clear ();
60
}
67
}
61
68
(-)a/src/devices/wifi/yans-wifi-phy.cc (+2 lines)
 Lines 139-144    Link Here 
139
  m_channel = 0;
139
  m_channel = 0;
140
  m_modes.clear ();
140
  m_modes.clear ();
141
  m_device = 0;
141
  m_device = 0;
142
  m_mobility = 0;
143
  m_state = 0;
142
}
144
}
143
145
144
void
146
void
(-)a/src/helper/net-device-container.cc (+8 lines)
 Lines 39-44    Link Here 
39
  *this = a;
39
  *this = a;
40
  Add (b);
40
  Add (b);
41
}
41
}
42
NetDeviceContainer::~NetDeviceContainer ()
43
{
44
  for (std::vector<Ptr<NetDevice> >::iterator i = m_devices.begin (); i != m_devices.end (); i++)
45
    {
46
      *i = 0;
47
    }
48
  m_devices.clear ();
49
}
42
50
43
51
44
NetDeviceContainer::Iterator 
52
NetDeviceContainer::Iterator 
(-)a/src/helper/net-device-container.h (+5 lines)
 Lines 85-90    Link Here 
85
  NetDeviceContainer (const NetDeviceContainer &a, const NetDeviceContainer &b);
85
  NetDeviceContainer (const NetDeviceContainer &a, const NetDeviceContainer &b);
86
86
87
  /**
87
  /**
88
   * Destroy a NetDeviceContainer
89
   */
90
  ~NetDeviceContainer ();
91
92
  /**
88
   * \brief Get an iterator which refers to the first NetDevice in the 
93
   * \brief Get an iterator which refers to the first NetDevice in the 
89
   * container.
94
   * container.
90
   *
95
   *
(-)a/src/helper/node-container.cc (+8 lines)
 Lines 67-72    Link Here 
67
  Add (e);
67
  Add (e);
68
}
68
}
69
69
70
NodeContainer::~NodeContainer ()
71
{
72
  for (std::vector<Ptr<Node> >::iterator i = m_nodes.begin (); i != m_nodes.end (); i++)
73
    {
74
      *i = 0;
75
    }
76
}
77
70
NodeContainer::Iterator 
78
NodeContainer::Iterator 
71
NodeContainer::Begin (void) const
79
NodeContainer::Begin (void) const
72
{
80
{
(-)a/src/helper/node-container.h (+5 lines)
 Lines 138-143    Link Here 
138
                 const NodeContainer &e);
138
                 const NodeContainer &e);
139
139
140
  /**
140
  /**
141
   * Destroy a NodeContainer
142
   */
143
  ~NodeContainer ();
144
145
  /**
141
   * \brief Get an iterator which refers to the first Node in the 
146
   * \brief Get an iterator which refers to the first Node in the 
142
   * container.
147
   * container.
143
   *
148
   *
(-)a/src/node/net-device.cc (-1 / +3 lines)
 Lines 45-50    Link Here 
45
}
45
}
46
46
47
NetDevice::~NetDevice ()
47
NetDevice::~NetDevice ()
48
{}
48
{
49
  NS_LOG_FUNCTION_NOARGS ();
50
}
49
51
50
} // namespace ns3
52
} // namespace ns3
(-)a/src/node/node.cc (+6 lines)
 Lines 148-153    Link Here 
148
void 
148
void 
149
Node::DoDispose()
149
Node::DoDispose()
150
{
150
{
151
  for (ProtocolHandlerList::iterator i = m_handlers.begin ();
152
       i != m_handlers.end (); i++)
153
    {
154
      i->device = 0;
155
    }
156
  m_handlers.clear ();
151
  for (std::vector<Ptr<NetDevice> >::iterator i = m_devices.begin ();
157
  for (std::vector<Ptr<NetDevice> >::iterator i = m_devices.begin ();
152
       i != m_devices.end (); i++)
158
       i != m_devices.end (); i++)
153
    {
159
    {

Return to bug 711