From ddef4292bd7446b7c8f7db76d03795f5d10a0788 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Fri, 16 Oct 2009 01:45:47 +0000 Subject: svn revert -r136312 llinstancetracker.h - reverted changed to instance tracker that won't work with llcommon.dll --- indra/llcommon/llinstancetracker.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'indra/llcommon/llinstancetracker.h') diff --git a/indra/llcommon/llinstancetracker.h b/indra/llcommon/llinstancetracker.h index de25e364fa..ea50acbbc5 100644 --- a/indra/llcommon/llinstancetracker.h +++ b/indra/llcommon/llinstancetracker.h @@ -71,13 +71,17 @@ private: static std::map& getMap() { - static std::map* sInstances = new std::map(); + if (! sInstances) + { + sInstances = new std::map; + } return *sInstances; } private: KEY mKey; + static std::map* sInstances; }; // explicit specialization for default case where KEY is T* @@ -101,10 +105,17 @@ protected: static std::set& getSet() // called after getReady() but before go() { - static std::set* sInstances = new std::set(); + if (! sInstances) + { + sInstances = new std::set; + } return *sInstances; } + + static std::set* sInstances; }; +template std::map* LLInstanceTracker::sInstances = NULL; +template std::set* LLInstanceTracker::sInstances = NULL; #endif -- cgit v1.2.3