summaryrefslogtreecommitdiff
path: root/indra/llcommon/llrefcount.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcommon/llrefcount.h')
-rw-r--r--indra/llcommon/llrefcount.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/indra/llcommon/llrefcount.h b/indra/llcommon/llrefcount.h
index 2080da1565..2281bf87da 100644
--- a/indra/llcommon/llrefcount.h
+++ b/indra/llcommon/llrefcount.h
@@ -51,21 +51,17 @@ protected:
public:
LLRefCount();
- inline void validateRefCount() const
- {
- llassert(mRef > 0); // ref count below 0, likely corrupted
- llassert(mRef < gMaxRefCount); // ref count excessive, likely memory leak
- }
-
inline void ref() const
{
+ llassert(mRef != LL_REFCOUNT_FREE); // object is deleted
mRef++;
- validateRefCount();
+ llassert(mRef < gMaxRefCount); // ref count excessive, likely memory leak
}
inline S32 unref() const
{
- validateRefCount();
+ llassert(mRef != LL_REFCOUNT_FREE); // object is deleted
+ llassert(mRef > 0); // ref count below 1, likely corrupted
if (0 == --mRef)
{
mRef = LL_REFCOUNT_FREE; // set to nonsense yet recognizable value to aid in debugging