aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llcommon/llmemory.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:50 -0500
committerJacek Antonelli2008-08-15 23:44:50 -0500
commit89fe5dab825a62a0e3fd8d248cbc91c65eb2a426 (patch)
treebcff14b7888d04a2fec799c59369f6095224bd08 /linden/indra/llcommon/llmemory.cpp
parentSecond Life viewer sources 1.13.3.2 (diff)
downloadmeta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.zip
meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.gz
meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.bz2
meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.xz
Second Life viewer sources 1.14.0.0
Diffstat (limited to 'linden/indra/llcommon/llmemory.cpp')
-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{