[Solved] Will this free all my **pointer memory? [closed]


That is hard to tell, because it depends on the way these pointers were allocated.

But, as you have pointers 3 levels deep, I suppose it is not enough to free them.

You should have a look at tools like valgrind which helps you to identify memory leaks.

To explain a bit, char *** means that you have a pointer to a pointer to a pointer to a char. That means that the pointer points to a region of memory which can be allocated statically or dynamically. The same holds for all other levels.

You have to free() exactly those levels which were created dynamically, i. e. via malloc(), calloc(), realloc() or strdup().

1

solved Will this free all my **pointer memory? [closed]