Here a summary cut&paste:
Clear():
Clear the clones array. Only use this routine when your objects don't allocate memory
since it will not call the object dtors.
Delete():
Clear the clones array. Use this routine when your objects allocate memory (e.g. objects
inheriting from TNamed or containing TStrings allocate memory).
If not you better use Clear() since if is faster.
As far as I have understod, the usage of clear or delete depends on the data members of the object itself
[Updated on: Wed, 09 September 2009 16:03]
Report message to a moderator