summaryrefslogtreecommitdiff
path: root/indra/llcommon/llerror.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2015-06-24 21:14:55 -0400
committerNat Goodspeed <nat@lindenlab.com>2015-06-24 21:14:55 -0400
commitd792baf9f7220a374788b35789335a7ae2e62369 (patch)
tree8247580520f41bc3237e4333598f356d1221d0c9 /indra/llcommon/llerror.cpp
parent7deca6951fb4991fcebb1e89aad8b851aa2bc883 (diff)
MAINT-5232: Introduce inter-LLSingleton dependency tracking.
Introduce LLSingleton::cleanupSingleton() canonical method as the place to put any subclass cleanup logic that might take nontrivial realtime or throw an exception. Neither is appropriate in a destructor. Track all extant LLSingleton subclass instances on a master list, which permits adding LLSingletonBase::cleanupAll() and deleteAll() methods. Also notice when any LLSingleton subclass constructor (or initSingleton() method) calls instance() or getInstance() for another LLSingleton, and capture that other LLSingleton instance as a dependency of the first. This permits cleanupAll() and deleteAll() to perform a dependency sort on the master list, thus cleaning up (or deleting) leaf LLSingletons AFTER the LLSingletons that depend on them. Make C++ runtime's final static destructor call LLSingletonBase::deleteAll() instead of deleting individual LLSingleton instances in arbitrary order. Eliminate "llerror.h" from llsingleton.h, a longstanding TODO.
Diffstat (limited to 'indra/llcommon/llerror.cpp')
0 files changed, 0 insertions, 0 deletions