destroy-create vs grow function (memory class)

I wonder whether some parts of the code, like in compute_centro_atom.cpp (see below), where calls to memory's destroy and subsequent create function are used to increase the size of vectors and arrays, could be substituted by calls to the grow function, provided that the size of the first dimension is to be increased in case of an array.

I use the grow function in such situations and it seems to work perfectly. So, are those parts I described above "legacy" issues? Or, is there a reason to use destroy-create?


From compute_centro_atom.cpp

The only reason to use grow() is if

you want to retain the info already in the
array, which will be copied if the array is
reallocated. I think the examples you mention

there is no need to retain info, so destroy/create

is preferred.

It’s the same difference in C as free/malloc vs