diff options
author | Richard Nelson <richard@lindenlab.com> | 2011-10-17 18:29:03 -0700 |
---|---|---|
committer | Richard Nelson <richard@lindenlab.com> | 2011-10-17 18:29:03 -0700 |
commit | 525eb6ba9f38565be6038b5dd78cf0fb7bf0ff45 (patch) | |
tree | 39411f5b3337d70cc8cf812d2211ba5ecf700eb4 /indra | |
parent | 69cad25445a268c25c1f7a03fcd0f70d07a9596a (diff) | |
parent | 3b4f4d34eaa79f44acc5f1d7fdf5a25b692e037a (diff) |
Automated merge with ssh://hg.lindenlab.com/richard/viewer-experience-fui
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llcommon/llinstancetracker.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/llcommon/llinstancetracker.h b/indra/llcommon/llinstancetracker.h index 5a3990a8df..34d841a4e0 100644 --- a/indra/llcommon/llinstancetracker.h +++ b/indra/llcommon/llinstancetracker.h @@ -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() |