File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 77#include "./macros.h"
88#include "./patterns/main.h"
99
10- // TODO: Documentation
10+ /**
11+ * @brief Frees the memory allocated for a 2D array.
12+ *
13+ * This function deallocates the memory used by a 2D array of characters. It iterates through each
14+ * row, frees the memory allocated for each row, and then frees the memory allocated for the array
15+ * of row pointers.
16+ *
17+ * @param arr 2D array to be destroyed.
18+ * @param rows number of rows in the 2D array.
19+ * @param cols number of columns in the 2D array.
20+ *
21+ * @warning Ensure that the array has been dynamically allocated and that the number of rows and
22+ * columns are correctly specified to avoid undefined behavior.
23+ */
1124void destroy2DArray (char * * arr , int rows , int cols );
1225
1326/**
You can’t perform that action at this time.
0 commit comments