Question: Create a function which takes an array of pointers to your structs and frees (de-allocates) all the memory your program allocated in creating the array.
Create a function which takes an array of pointers to your structs and frees (de-allocates) all the memory your program allocated in creating the array. There are two types of memory you allocated when creating the array: a. You allocated memory for each of the structs the array points to b. You allocated memory for the array of pointers to the structs. Make sure your program does not free the same memory multiple times!
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
