Skip to content

Commit e23d9cb

Browse files
authored
Fix a few leaked handles (#1260)
1 parent cc96a61 commit e23d9cb

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/AspNetCoreModuleV2/InProcessRequestHandler/inprocessapplication.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ IN_PROCESS_APPLICATION::IN_PROCESS_APPLICATION(
4444

4545
IN_PROCESS_APPLICATION::~IN_PROCESS_APPLICATION()
4646
{
47-
m_hThread = NULL;
4847
s_Application = NULL;
4948
}
5049

@@ -190,8 +189,6 @@ IN_PROCESS_APPLICATION::ShutDownInternal()
190189
}
191190
}
192191

193-
CloseHandle(m_hThread);
194-
m_hThread = NULL;
195192
s_Application = NULL;
196193
}
197194

src/AspNetCoreModuleV2/InProcessRequestHandler/inprocessapplication.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ class IN_PROCESS_APPLICATION : public InProcessApplicationBase
121121
};
122122

123123
// Thread executing the .NET Core process
124-
HANDLE m_hThread;
124+
HandleWrapper<InvalidHandleTraits> m_hThread;
125125

126126
// The request handler callback from managed code
127127
PFN_REQUEST_HANDLER m_RequestHandler;
@@ -134,7 +134,7 @@ class IN_PROCESS_APPLICATION : public InProcessApplicationBase
134134
PFN_ASYNC_COMPLETION_HANDLER m_AsyncCompletionHandler;
135135

136136
// The event that gets triggered when managed initialization is complete
137-
HANDLE m_pInitalizeEvent;
137+
HandleWrapper<InvalidHandleTraits> m_pInitalizeEvent;
138138

139139
STRU m_struExeLocation;
140140

0 commit comments

Comments
 (0)