aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llcommon/llmemory.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/llcommon/llmemory.cpp43
1 files changed, 6 insertions, 37 deletions
diff --git a/linden/indra/llcommon/llmemory.cpp b/linden/indra/llcommon/llmemory.cpp
index 9bfbf88..8528433 100644
--- a/linden/indra/llcommon/llmemory.cpp
+++ b/linden/indra/llcommon/llmemory.cpp
@@ -28,6 +28,12 @@
28#include "linden_common.h" 28#include "linden_common.h"
29 29
30#include "llmemory.h" 30#include "llmemory.h"
31#include "llmemtype.h"
32
33// not defining nullfunc will currently crash when trying to use a LLHandle
34template< typename _Ty >
35 const typename LLHandle< _Ty >::NullFunc
36 LLHandle< _Ty >::sNullFunc = LLHandle< _Ty >::defaultNullFunc;
31 37
32//---------------------------------------------------------------------------- 38//----------------------------------------------------------------------------
33 39
@@ -258,43 +264,6 @@ void operator delete[] (void *p)
258 264
259//---------------------------------------------------------------------------- 265//----------------------------------------------------------------------------
260 266
261//static
262LLMutex* LLThreadSafeRefCount::sMutex = 0;
263
264//static
265void LLThreadSafeRefCount::initClass()
266{
267 if (!sMutex)
268 {
269 sMutex = new LLMutex(0);
270 }
271}
272
273//static
274void LLThreadSafeRefCount::cleanupClass()
275{
276 delete sMutex;
277 sMutex = NULL;
278}
279
280
281//----------------------------------------------------------------------------
282
283LLThreadSafeRefCount::LLThreadSafeRefCount() :
284 mRef(0)
285{
286}
287
288LLThreadSafeRefCount::~LLThreadSafeRefCount()
289{
290 if (mRef != 0)
291 {
292 llerrs << "deleting non-zero reference" << llendl;
293 }
294}
295
296//----------------------------------------------------------------------------
297
298LLRefCount::LLRefCount() : 267LLRefCount::LLRefCount() :
299 mRef(0) 268 mRef(0)
300{ 269{