mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-12-01 08:31:14 +00:00
Added DeleteAndClear method to TDeletingArray.
- Normally, TDeletingArray only deletes its contents when it is destroyed. Now you can do it earlier if you want.
This commit is contained in:
parent
f6bbd5abf7
commit
e3e32d7cca
1 changed files with 9 additions and 0 deletions
|
@ -371,6 +371,15 @@ public:
|
|||
delete (*this)[i];
|
||||
}
|
||||
}
|
||||
void DeleteAndClear()
|
||||
{
|
||||
for (unsigned int i = 0; i < TArray<T,TT>::Size(); ++i)
|
||||
{
|
||||
if ((*this)[i] != NULL)
|
||||
delete (*this)[i];
|
||||
}
|
||||
Clear();
|
||||
}
|
||||
};
|
||||
|
||||
// TAutoGrowArray -----------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue