diff options
Diffstat (limited to 'indra/llcommon/llmemory.h')
-rw-r--r-- | indra/llcommon/llmemory.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h index 2a58db659e..1253d34a7d 100644 --- a/indra/llcommon/llmemory.h +++ b/indra/llcommon/llmemory.h @@ -174,6 +174,14 @@ public: } return *this; } + + // Just exchange the pointers, which will not change the reference counts. + static void swap(LLPointer<Type>& a, LLPointer<Type>& b) + { + Type* temp = a.mPointer; + a.mPointer = b.mPointer; + b.mPointer = temp; + } protected: void ref() |