remove leaks and rework the Ptr class to work with a new refcount mechanism
This commit is contained in:
1 parent
e8f3c754b4
commit
7102517ca9
12 files changed
+126
-57
No files matched your search
@@ -45,10 +45,18 @@ InternetNode::InternetNode()
|
||||
Arp *arp = new Arp (this);
|
||||
Udp *udp = new Udp (this);
|
||||
|
||||
ipv4->Ref ();
|
||||
arp->Ref ();
|
||||
udp->Ref ();
|
||||
|
||||
ApplicationList *applicationList = new ApplicationList(this);
|
||||
L3Demux *l3Demux = new L3Demux(this);
|
||||
Ipv4L4Demux *ipv4L4Demux = new Ipv4L4Demux(this);
|
||||
|
||||
applicationList->Ref ();
|
||||
l3Demux->Ref ();
|
||||
ipv4L4Demux->Ref ();
|
||||
|
||||
l3Demux->Insert (ipv4);
|
||||
l3Demux->Insert (arp);
|
||||
ipv4L4Demux->Insert (udp);
|
||||
@@ -58,6 +66,11 @@ InternetNode::InternetNode()
|
||||
IIpv4Impl *ipv4Impl = new IIpv4Impl (ipv4);
|
||||
IIpv4Private *ipv4Private = new IIpv4Private (ipv4);
|
||||
|
||||
udpImpl->Ref ();
|
||||
arpPrivate->Ref ();
|
||||
ipv4Impl->Ref ();
|
||||
ipv4Private->Ref ();
|
||||
|
||||
NsUnknown::AddInterface (ipv4Private);
|
||||
NsUnknown::AddInterface (ipv4Impl);
|
||||
NsUnknown::AddInterface (arpPrivate);
|
||||
|
||||
Reference in new issue
Block a user