8296463: Memory leak in JVM_StartThread with the integration of Virtual threads

Reviewed-by: alanb, coleenp, dcubed
This commit is contained in:
David Holmes 2022-11-18 00:46:09 +00:00
parent 373e52c0ab
commit 7b3984cb5a

View File

@ -599,10 +599,11 @@ JavaThread::JavaThread(ThreadFunction entry_point, size_t stack_sz) : JavaThread
JavaThread::~JavaThread() {
// Ask ServiceThread to release the threadObj OopHandle
// Ask ServiceThread to release the OopHandles
ServiceThread::add_oop_handle_release(_threadObj);
ServiceThread::add_oop_handle_release(_vthread);
ServiceThread::add_oop_handle_release(_jvmti_vthread);
ServiceThread::add_oop_handle_release(_extentLocalCache);
// Return the sleep event to the free list
ParkEvent::Release(_SleepEvent);