Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/coreclr/src/vm/eetoprofinterfaceimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,8 @@ HRESULT EEToProfInterfaceImpl::CreateProfiler(
m_hmodProfilerDLL = hmodProfilerDLL.Extract();
hmodProfilerDLL = NULL;

// ATTENTION: Please update EEToProfInterfaceImpl::~EEToProfInterfaceImpl() after adding the next ICorProfilerCallback interface here !!!

// The profiler may optionally support ICorProfilerCallback3,4,5,6,7,8,9,10. Let's check.
ReleaseHolder<ICorProfilerCallback10> pCallback10;
hr = m_pCallback2->QueryInterface(
Expand Down Expand Up @@ -904,6 +906,12 @@ EEToProfInterfaceImpl::~EEToProfInterfaceImpl()
m_pCallback9 = NULL;
}

if (m_pCallback10 != NULL)
{
m_pCallback10->Release();
m_pCallback10 = NULL;
}

// Only unload the V4 profiler if this is not part of shutdown. This protects
// Whidbey profilers that aren't used to being FreeLibrary'd.
if (fIsV4Profiler && !g_fEEShutDown)
Expand Down