Fixing the double delete problem in UdpSocket2ManagerWindow. PopFront deletes the items, to there is no need to delete item explicitly.
Review URL: http://webrtc-codereview.appspot.com/333014 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1268 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
7d8c72e2db
commit
03532b5f41
@ -68,8 +68,6 @@ UdpSocket2ManagerWindows::~UdpSocket2ManagerWindows()
|
|||||||
UdpSocket2WorkerWindows* pWorker;
|
UdpSocket2WorkerWindows* pWorker;
|
||||||
while((pItem = _workerThreadsList.First()) != NULL)
|
while((pItem = _workerThreadsList.First()) != NULL)
|
||||||
{
|
{
|
||||||
pWorker = (UdpSocket2WorkerWindows*)pItem->GetItem();
|
|
||||||
delete pWorker;
|
|
||||||
_workerThreadsList.PopFront();
|
_workerThreadsList.PopFront();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -217,8 +215,6 @@ bool UdpSocket2ManagerWindows::StartWorkerThreads()
|
|||||||
UdpSocket2WorkerWindows* pWorker;
|
UdpSocket2WorkerWindows* pWorker;
|
||||||
while((pItem = _workerThreadsList.First()) != NULL)
|
while((pItem = _workerThreadsList.First()) != NULL)
|
||||||
{
|
{
|
||||||
pWorker = (UdpSocket2WorkerWindows*)pItem->GetItem();
|
|
||||||
delete pWorker;
|
|
||||||
_workerThreadsList.PopFront();
|
_workerThreadsList.PopFront();
|
||||||
}
|
}
|
||||||
_pCrit->Leave();
|
_pCrit->Leave();
|
||||||
|
Loading…
Reference in New Issue
Block a user