Automated merge with ssh://hg.lindenlab.com/richard/viewer-experience-fui

meow-7.2.2
Richard Nelson 2011-10-17 18:29:03 -07:00
commit 525eb6ba9f
1 changed files with 8 additions and 2 deletions

View File

@ -193,7 +193,12 @@ public:
}
protected:
LLInstanceTracker(KEY key) { add_(key); }
LLInstanceTracker(KEY key)
{
// make sure static data outlives all instances
getStatic();
add_(key);
}
virtual ~LLInstanceTracker()
{
// it's unsafe to delete instances of this type while all instances are being iterated over.
@ -281,7 +286,8 @@ public:
protected:
LLInstanceTracker()
{
// it's safe but unpredictable to create instances of this type while all instances are being iterated over. I hate unpredictable. This assert will probably be turned on early in the next development cycle.
// make sure static data outlives all instances
getStatic();
getSet_().insert(static_cast<T*>(this));
}
virtual ~LLInstanceTracker()