From 26484fe64b7da200643e15e59ca9f90bfe0089e2 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Fri, 26 Jul 2013 07:30:54 -0700 Subject: [PATCH] Add OwnedArray::clearQuick() --- .../modules/beast_core/containers/beast_OwnedArray.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Subtrees/beast/modules/beast_core/containers/beast_OwnedArray.h b/Subtrees/beast/modules/beast_core/containers/beast_OwnedArray.h index 697a6e3dcd..f4f964cef8 100644 --- a/Subtrees/beast/modules/beast_core/containers/beast_OwnedArray.h +++ b/Subtrees/beast/modules/beast_core/containers/beast_OwnedArray.h @@ -101,6 +101,17 @@ public: numUsed = 0; } + /** Removes all elements from the array without freeing the array's allocated storage. + + @see clear + */ + void clearQuick() + { + const ScopedLockType lock (getLock()); + deleteAllElements(); + numUsed = 0; + } + //============================================================================== /** Returns the number of items currently in the array. @see operator[]