summaryrefslogtreecommitdiff
path: root/indra/llcommon/llrefcount.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2022-05-27 02:53:34 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2022-05-27 02:53:34 +0300
commitb2ef95522f07301cfddbdace1042e60d52fde436 (patch)
treec51119f79b734a7d503bb3adeac1759b819c8f92 /indra/llcommon/llrefcount.cpp
parent43a338c6270f9a000052465d09d4ad999524af0b (diff)
parent3da7a50b71d4ef5919c2d4d5b9547b3ef0abab7d (diff)
Merge branch 'DRTVWR-543-maint' into DRTVWR-543-maint_cmake
Diffstat (limited to 'indra/llcommon/llrefcount.cpp')
-rw-r--r--indra/llcommon/llrefcount.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/indra/llcommon/llrefcount.cpp b/indra/llcommon/llrefcount.cpp
index 29a5ca6f24..5cbd346411 100644
--- a/indra/llcommon/llrefcount.cpp
+++ b/indra/llcommon/llrefcount.cpp
@@ -29,6 +29,9 @@
#include "llerror.h"
+// maximum reference count before sounding memory leak alarm
+const S32 gMaxRefCount = 65536;
+
LLRefCount::LLRefCount(const LLRefCount& other)
: mRef(0)
{
@@ -47,7 +50,7 @@ LLRefCount::LLRefCount() :
LLRefCount::~LLRefCount()
{
- if (mRef != 0)
+ if (mRef != LL_REFCOUNT_FREE && mRef != 0)
{
LL_ERRS() << "deleting non-zero reference" << LL_ENDL;
}