MCPcopy Create free account
hub / github.com/beefytech/Beef / Clear

Method Clear

IDEHelper/NetManager.cpp:600–626  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

598}
599
600void NetManager::Clear()
601{
602 AutoCrit autoCrit(mThreadPool.mCritSect);
603 BF_ASSERT(mWaitingResult == NULL); // The debugger thread shouldn't be waiting on anything, it should be detached at this point
604
605 for (auto job : mThreadPool.mJobs)
606 {
607 auto netRequest = (NetRequest*)job;
608 netRequest->Cancel();
609 }
610
611 for (auto kv : mCachedResults)
612 {
613 NetResult* netResult = kv.mValue;
614 if (netResult->mCurRequest != NULL)
615 netResult->mRemoved = true;
616 else
617 delete netResult;
618 }
619 mCachedResults.Clear();
620
621 for (auto netResult : mOldResults)
622 {
623 delete netResult;
624 }
625 mOldResults.Clear();
626}
627
628void NetManager::CancelCurrent()
629{

Callers 1

DoTransferMethod · 0.45

Calls 1

CancelMethod · 0.45

Tested by

no test coverage detected