Skip to content
Snippets Groups Projects
  • Nat Goodspeed's avatar
    31863d83
    DRTVWR-494: Move most LLSingleton cleanup back to destructor · 31863d83
    Nat Goodspeed authored
    instead of deleteSingleton().
    
    Specifically, clear static SingletonData and remove the instance from the
    MasterList in the destructor.
    
    Empirically, some consumers are manually deleting LLSingleton instances,
    instead of calling deleteSingleton(). If deleteSingleton() handles cleanup
    rather than the destructor, we're left with dangling pointers in the Master
    List.
    
    We don't also call cleanupSingleton() from the destructor because only
    deleteSingleton() promises to call cleanupSingleton(). Hopefully whoever is
    directly deleting an LLSingleton subclass instance isn't relying on
    cleanupSingleton().
    31863d83
    History
    DRTVWR-494: Move most LLSingleton cleanup back to destructor
    Nat Goodspeed authored
    instead of deleteSingleton().
    
    Specifically, clear static SingletonData and remove the instance from the
    MasterList in the destructor.
    
    Empirically, some consumers are manually deleting LLSingleton instances,
    instead of calling deleteSingleton(). If deleteSingleton() handles cleanup
    rather than the destructor, we're left with dangling pointers in the Master
    List.
    
    We don't also call cleanupSingleton() from the destructor because only
    deleteSingleton() promises to call cleanupSingleton(). Hopefully whoever is
    directly deleting an LLSingleton subclass instance isn't relying on
    cleanupSingleton().
Code owners
Assign users and groups as approvers for specific file changes. Learn more.