Hello,
I'm writing some C code for a class, and as part of it, I'm dynamically creating two two-dimensional arrays.
One of them is a dynamic array of dynamic arrays - so I know that to clean that up I need to loop through each array and use free() before I use free() on the whole thing. But one of them is an array of arrays (strings) that the program didn't create (it's basically an array of different filenames taken from the command line).
Am I supposed to do a "looped free()" in this case too? I know normally when it's not a dynamically-created array it gets cleaned up automatically - is that also the case when you stick it inside a dynamic array?