1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Added method OwnedArray::clearQuick

This commit is contained in:
jules 2013-07-27 12:33:42 +01:00
parent b91983c480
commit 19b7d59c14

View file

@ -98,7 +98,7 @@ public:
//==============================================================================
/** Clears the array, optionally deleting the objects inside it first. */
void clear (const bool deleteObjects = true)
void clear (bool deleteObjects = true)
{
const ScopedLockType lock (getLock());
@ -109,6 +109,18 @@ public:
numUsed = 0;
}
//==============================================================================
/** Clears the array, optionally deleting the objects inside it first. */
void clearQuick (bool deleteObjects)
{
const ScopedLockType lock (getLock());
if (deleteObjects)
deleteAllObjects();
numUsed = 0;
}
//==============================================================================
/** Returns the number of items currently in the array.
@see operator[]