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:
parent
b91983c480
commit
19b7d59c14
1 changed files with 13 additions and 1 deletions
|
|
@ -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[]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue