Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
[Merge chakra-core/ChakraCore@07c15e7a55] [1.4>1.5] [MERGE #3092 @lei…
Browse files Browse the repository at this point in the history
…rocks] fix handle leak for recycler concurrent thread

Merge pull request #3092 from leirocks:handleleak
  • Loading branch information
chakrabot authored and kfarnung committed Jun 5, 2017
1 parent f92db9d commit 48524b8
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions deps/chakrashim/core/lib/Common/Memory/Recycler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4855,7 +4855,11 @@ Recycler::FinalizeConcurrent(bool restoreState)
}

this->threadService = nullptr;
this->concurrentThread = nullptr;
if (concurrentThread != NULL)
{
CloseHandle(concurrentThread);
this->concurrentThread = nullptr;
}
}

bool
Expand Down Expand Up @@ -4987,10 +4991,6 @@ Recycler::ShutdownThread()
Assert(concurrentThread != NULL || threadService->HasCallback());

FinalizeConcurrent(false);
if (concurrentThread)
{
CloseHandle(concurrentThread);
}
}
}

Expand All @@ -5002,10 +5002,6 @@ Recycler::DisableConcurrent()
Assert(concurrentThread != NULL || threadService->HasCallback());

FinalizeConcurrent(true);
if (concurrentThread)
{
CloseHandle(concurrentThread);
}
this->collectionState = CollectionStateNotCollecting;
}
}
Expand Down

0 comments on commit 48524b8

Please sign in to comment.