540 { MutexLocker ml(BeforeExit_lock); |
540 { MutexLocker ml(BeforeExit_lock); |
541 _before_exit_status = BEFORE_EXIT_DONE; |
541 _before_exit_status = BEFORE_EXIT_DONE; |
542 BeforeExit_lock->notify_all(); |
542 BeforeExit_lock->notify_all(); |
543 } |
543 } |
544 |
544 |
|
545 // Shutdown NMT before exit. Otherwise, |
|
546 // it will run into trouble when system destroys static variables. |
|
547 MemTracker::shutdown(MemTracker::NMT_normal); |
|
548 |
545 #undef BEFORE_EXIT_NOT_RUN |
549 #undef BEFORE_EXIT_NOT_RUN |
546 #undef BEFORE_EXIT_RUNNING |
550 #undef BEFORE_EXIT_RUNNING |
547 #undef BEFORE_EXIT_DONE |
551 #undef BEFORE_EXIT_DONE |
548 } |
552 } |
549 |
553 |