mirror of https://github.com/ARMmbed/mbed-os.git
Cellular: Destructor added for CellularList
parent
658358cbf1
commit
7e684cd789
|
|
@ -38,6 +38,17 @@ public:
|
|||
_tail=NULL;
|
||||
}
|
||||
|
||||
~CellularList()
|
||||
{
|
||||
T *temp = _head;
|
||||
while (temp) {
|
||||
_head = _head->next;
|
||||
delete temp;
|
||||
temp = _head;
|
||||
}
|
||||
_tail=NULL;
|
||||
}
|
||||
|
||||
T* add_new()
|
||||
{
|
||||
T *temp=new T;
|
||||
|
|
@ -88,6 +99,7 @@ public:
|
|||
delete temp;
|
||||
temp = _head;
|
||||
}
|
||||
_tail=NULL;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue