diff --git a/src/tarray.h b/src/tarray.h index 3e66aa748..57de62984 100644 --- a/src/tarray.h +++ b/src/tarray.h @@ -371,6 +371,15 @@ public: delete (*this)[i]; } } + void DeleteAndClear() + { + for (unsigned int i = 0; i < TArray::Size(); ++i) + { + if ((*this)[i] != NULL) + delete (*this)[i]; + } + Clear(); + } }; // TAutoGrowArray -----------------------------------------------------------