Skip to content
Snippets Groups Projects
  • Nat Goodspeed's avatar
    d415e019
    DRTVWR-418: Remove final shutdown cleanup as a cause of crashes. · d415e019
    Nat Goodspeed authored
    The recent LLSingleton work added a hook that would run during the C++
    runtime's final destruction of static objects. When the LAST LLSingleton in
    any module was destroyed, its destructor would call
    LLSingletonBase::deleteAll(). That mechanism was intended to permit an
    application consuming LLSingletons to skip making an explicit deleteAll()
    call, knowing that all instantiated LLSingleton instances would eventually be
    cleaned up anyway.
    
    However -- experience proves that kicking off deleteAll() processing during
    the C++ runtime's final cleanup is too late. Too much has already been
    destroyed. That call tends to cause more shutdown crashes than it resolves.
    
    This commit deletes that whole mechanism. Going forward, if you want to clean
    up LLSingleton instances, you must explicitly call
    LLSingletonBase::deleteAll() during the application lifetime. If you don't,
    LLSingleton instances will simply be leaked -- which might be okay,
    considering the application is terminating anyway.
    d415e019
    History
    DRTVWR-418: Remove final shutdown cleanup as a cause of crashes.
    Nat Goodspeed authored
    The recent LLSingleton work added a hook that would run during the C++
    runtime's final destruction of static objects. When the LAST LLSingleton in
    any module was destroyed, its destructor would call
    LLSingletonBase::deleteAll(). That mechanism was intended to permit an
    application consuming LLSingletons to skip making an explicit deleteAll()
    call, knowing that all instantiated LLSingleton instances would eventually be
    cleaned up anyway.
    
    However -- experience proves that kicking off deleteAll() processing during
    the C++ runtime's final cleanup is too late. Too much has already been
    destroyed. That call tends to cause more shutdown crashes than it resolves.
    
    This commit deletes that whole mechanism. Going forward, if you want to clean
    up LLSingleton instances, you must explicitly call
    LLSingletonBase::deleteAll() during the application lifetime. If you don't,
    LLSingleton instances will simply be leaked -- which might be okay,
    considering the application is terminating anyway.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.