Skip to content

Commit

Permalink
Move freeing the dynamic heaps until after freeing the code data
Browse files Browse the repository at this point in the history
  • Loading branch information
davmason committed Jun 30, 2022
1 parent d04a589 commit 9236c0b
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/coreclr/vm/dynamicmethod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1010,13 +1010,6 @@ void LCGMethodResolver::Destroy()
}
}

// Note that we need to do this before m_jitTempData is deleted
RecycleIndCells();

m_jitMetaHeap.Delete();
m_jitTempData.Delete();


if (m_recordCodePointer)
{
#if defined(TARGET_AMD64)
Expand Down Expand Up @@ -1050,6 +1043,12 @@ void LCGMethodResolver::Destroy()
m_pJumpStubCache = NULL;
}

// Note that we need to do this before m_jitTempData is deleted
RecycleIndCells();

m_jitMetaHeap.Delete();
m_jitTempData.Delete();

if (m_managedResolver)
{
::DestroyLongWeakHandle(m_managedResolver);
Expand Down

0 comments on commit 9236c0b

Please sign in to comment.