src/os/windows/vm/os_windows.cpp

Print this page
rev 6314 : imported patch nmtfix

*** 128,137 **** --- 128,144 ---- timeBeginPeriod(1L); break; case DLL_PROCESS_DETACH: if(ForceTimeHighResolution) timeEndPeriod(1L); + + // Workaround for issue when a custom launcher doesn't call + // DestroyJavaVM and NMT is trying to track memory when free is + // called from a static destructor + if (MemTracker::is_on()) { + MemTracker::shutdown(MemTracker::NMT_normal); + } break; default: break; } return true;