From 571d6a4bb768e0042ff544e4d9854204c4f3622f Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 16 Feb 2012 08:02:13 +0000 Subject: Bu::SPtr has a clear function now, and also the function count() didn't match the rest of the API, now it's getRefCount() --- src/sptr.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/sptr.h b/src/sptr.h index 4e581a9..4eb5a52 100644 --- a/src/sptr.h +++ b/src/sptr.h @@ -59,11 +59,18 @@ namespace Bu * Get the number of references to this pointer. *@returns (int32_t) The number of references to this pointer. */ - int32_t count() const + int32_t getRefCount() const { return *pRefCnt; } + void clear() + { + decCount(); + pRefCnt = NULL; + pData = NULL; + } + /** * Pointer access operator. *@returns (const T *) -- cgit v1.2.3